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