public interface AttributeContainer
Modifier and Type | Method and Description |
---|---|
<T> Optional<T> |
findAttribute(NamedAttributeAccess<T> accessor)
Access one attribute of a specific name and type which is known in the first place, consult
NamedAttributeAccess how to implement these. |
default Optional<Attribute> |
findAttribute(String attributeName) |
default <T> Optional<T> |
findAttribute(String name,
AttributeAccess<T> accessor) |
default Attribute |
getAttribute(String attributeName) |
List<Attribute> |
getAttributes() |
default boolean |
hasAttribute(NamedAttributeAccess<?> namedAccess) |
default boolean |
hasAttribute(String attributeName) |
static AttributeContainer |
of(List<Attribute> attributes) |
<T> Optional<T> findAttribute(NamedAttributeAccess<T> accessor)
NamedAttributeAccess
how to implement these.T
- the underlying type of the attributeaccessor
- declaration of the name and type of the attributeJsonException
- if the type of attribute cannot be parseddefault <T> Optional<T> findAttribute(String name, AttributeAccess<T> accessor)
default boolean hasAttribute(String attributeName)
default boolean hasAttribute(NamedAttributeAccess<?> namedAccess)
static AttributeContainer of(List<Attribute> attributes)