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