public interface AttributeContainer extends java.lang.Iterable<Attribute>
Modifier and Type | Method and Description |
---|---|
void |
addAll(java.lang.Iterable<Attribute> atts)
Deprecated.
will be removed in version 6.
|
Attribute |
addAttribute(Attribute att)
Deprecated.
will be removed in version 6.
|
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.
|
default java.lang.String |
findAttValueIgnoreCase(java.lang.String attName,
java.lang.String defaultValue)
Deprecated.
use findAttributeString().
|
java.util.List<Attribute> |
getAttributes()
Deprecated.
use Iterable
|
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.
|
boolean |
remove(Attribute a)
Deprecated.
will be removed in version 6.
|
boolean |
removeAttribute(java.lang.String attName)
Deprecated.
will be removed in version 6.
|
boolean |
removeAttributeIgnoreCase(java.lang.String attName)
Deprecated.
will be removed in version 6.
|
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)
default boolean hasAttribute(java.lang.String attName)
@Nullable Attribute findAttributeIgnoreCase(java.lang.String attName)
default boolean hasAttributeIgnoreCase(java.lang.String attName)
double findAttributeDouble(java.lang.String attName, double defaultValue)
int findAttributeInteger(java.lang.String attName, int defaultValue)
java.lang.String findAttributeString(java.lang.String attName, java.lang.String defaultValue)
boolean isEmpty()
@Nullable java.lang.String getName()
default java.util.Iterator<Attribute> iterator()
iterator
in interface java.lang.Iterable<Attribute>
@Deprecated default java.lang.String findAttValueIgnoreCase(java.lang.String attName, java.lang.String defaultValue)
@Deprecated java.util.List<Attribute> getAttributes()
@Deprecated void addAll(java.lang.Iterable<Attribute> atts)
@Deprecated Attribute addAttribute(Attribute att)
att
- add this Attribute@Deprecated boolean remove(Attribute a)
a
- remove this attribute@Deprecated boolean removeAttribute(java.lang.String attName)
attName
- if exists, remove this attribute@Deprecated boolean removeAttributeIgnoreCase(java.lang.String attName)
attName
- if exists, remove this attribute