public interface AttributeContainer extends java.lang.Iterable<Attribute>
Modifier and Type | Method and Description |
---|---|
static AttributeContainer |
filter(AttributeContainer atts,
java.lang.String... remove)
Create a new AttributeContainer, removing any whose name starts with one in the given list.
|
Attribute |
findAttribute(java.lang.String attName)
Find an Attribute by exact match on name.
|
double |
findAttributeDouble(java.lang.String attName,
double defaultValue)
Find a Numeric Attribute by name (ignore case), return the double value of the Attribute.
|
Attribute |
findAttributeIgnoreCase(java.lang.String attName)
Find an Attribute by name, first doing an exact match, then ignoring case.
|
int |
findAttributeInteger(java.lang.String attName,
int defaultValue)
Find a Numeric Attribute by name (ignore case), return the integer value of the Attribute.
|
java.lang.String |
findAttributeString(java.lang.String attName,
java.lang.String defaultValue)
Find a String Attribute by name (ignore case), return the String value of the Attribute.
|
java.lang.String |
getName()
Get the (optional) name of the AttributeContainer.
|
default boolean |
hasAttribute(java.lang.String attName)
Determine if named attribute exists (exact match).
|
default boolean |
hasAttributeIgnoreCase(java.lang.String attName)
Determine if named attribute exists, ignoring case.
|
boolean |
isEmpty()
True is there are no attributes in the container.
|
default java.util.Iterator<Attribute> |
iterator()
An unordered iterator over the contained attributes.
|
static AttributeContainer filter(AttributeContainer atts, java.lang.String... remove)
atts
- Start with this set of Attributes.remove
- Remove any whose name starts with one of these.@Nullable Attribute findAttribute(java.lang.String attName)
double findAttributeDouble(java.lang.String attName, double defaultValue)
@Nullable Attribute findAttributeIgnoreCase(java.lang.String attName)
int findAttributeInteger(java.lang.String attName, int defaultValue)
java.lang.String findAttributeString(java.lang.String attName, java.lang.String defaultValue)
@Nullable java.lang.String getName()
default boolean hasAttribute(java.lang.String attName)
default boolean hasAttributeIgnoreCase(java.lang.String attName)
boolean isEmpty()