public class AttributeContainerHelper extends Object implements AttributeContainer
| Constructor and Description |
|---|
AttributeContainerHelper(String name) |
AttributeContainerHelper(String name,
List<Attribute> from) |
| Modifier and Type | Method and Description |
|---|---|
void |
addAll(Iterable<Attribute> atts)
Add all; replace old if has same name
|
Attribute |
addAttribute(Attribute att)
Add new or replace old if has same name
|
static AttributeContainer |
filter(AttributeContainer atts,
String... remove) |
Attribute |
findAttribute(String name) |
Attribute |
findAttributeIgnoreCase(String name) |
String |
findAttValueIgnoreCase(String attName,
String defaultValue)
Find a String-valued Attribute by Attribute name (ignore case), return the (string) value of the Attribute.
|
List<Attribute> |
getAttributes()
Returns the list of attributes for this variable.
|
String |
getName() |
boolean |
remove(Attribute a)
Remove an Attribute : uses the attribute hashCode to find it.
|
boolean |
removeAttribute(String attName)
Remove an Attribute by name.
|
boolean |
removeAttributeIgnoreCase(String attName)
Remove an Attribute by name, ignoring case
|
void |
setImmutable() |
static void |
show(AttributeContainer atts,
Indent indent,
Formatter f) |
public AttributeContainerHelper(String name)
public String getName()
getName in interface AttributeContainerpublic void setImmutable()
public List<Attribute> getAttributes()
AttributeContainergetAttributes in interface AttributeContainerpublic Attribute addAttribute(Attribute att)
AttributeContaineraddAttribute in interface AttributeContaineratt - add this Attributepublic void addAll(Iterable<Attribute> atts)
addAll in interface AttributeContainerpublic String findAttValueIgnoreCase(String attName, String defaultValue)
AttributeContainerfindAttValueIgnoreCase in interface AttributeContainerpublic Attribute findAttribute(String name)
findAttribute in interface AttributeContainerpublic Attribute findAttributeIgnoreCase(String name)
findAttributeIgnoreCase in interface AttributeContainerpublic boolean remove(Attribute a)
remove in interface AttributeContainera - remove this attributepublic boolean removeAttribute(String attName)
removeAttribute in interface AttributeContainerattName - if exists, remove this attributepublic boolean removeAttributeIgnoreCase(String attName)
removeAttributeIgnoreCase in interface AttributeContainerattName - if exists, remove this attributepublic static AttributeContainer filter(AttributeContainer atts, String... remove)
public static void show(AttributeContainer atts, Indent indent, Formatter f)