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