public interface MutableAttributeHolder extends AttributeHolder
Modifier and Type | Method and Description |
---|---|
MutableConvertibleValues<java.lang.Object> |
getAttributes()
Overrides the default
AttributeHolder.getAttributes() method to return a mutable object. |
default <T> java.util.Optional<T> |
removeAttribute(java.lang.CharSequence name,
java.lang.Class<T> type)
Remove an attribute.
|
default MutableAttributeHolder |
setAttribute(java.lang.CharSequence name,
java.lang.Object value)
Sets an attribute on the message.
|
getAttribute, getAttribute
@NonNull MutableConvertibleValues<java.lang.Object> getAttributes()
AttributeHolder.getAttributes()
method to return a mutable object.getAttributes
in interface AttributeHolder
@NonNull default MutableAttributeHolder setAttribute(@NonNull java.lang.CharSequence name, @Nullable java.lang.Object value)
name
- The name of the attributevalue
- The value of the attribute@NonNull default <T> java.util.Optional<T> removeAttribute(@NonNull java.lang.CharSequence name, @NonNull java.lang.Class<T> type)
T
- type Genericname
- The name of the attributetype
- The required typeOptional
value