|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectthings.data.impl.AttributesReaderWrapper
public class AttributesReaderWrapper
A set of readable attributes from a simple hashmap.
Version History
EPG - Initial - 23 AUG 05
Field Summary | |
---|---|
protected java.util.HashMap<java.lang.String,java.lang.String> |
mYAttributes
Attributes, if needed. |
Constructor Summary | |
---|---|
AttributesReaderWrapper(java.util.HashMap<java.lang.String,java.lang.String> attributes)
Constructor. |
Method Summary | |
---|---|
NVImmutable |
getAttribute(java.lang.String n)
Get an attribute. |
NVImmutable |
getAttribute(java.lang.String n,
int index)
Get an attribute from a multi-attribute by index. |
int |
getAttributeCount()
Get attribute count. |
int |
getAttributeCount(java.lang.String n)
Get the total attribute count for a specific name. |
java.util.Collection<java.lang.String> |
getAttributeNames()
Get a collection of attribute names. |
java.util.Collection<NVImmutable> |
getAttributes()
Get a collection of the attributes. |
java.util.Collection<NVImmutable> |
getAttributes(java.lang.String n)
Get a collection of the attributes for the name. |
java.lang.String |
getAttributeValueToString(java.lang.String n)
Get an attribute value rendered as a string. |
java.lang.String |
getAttributeValueToString(java.lang.String n,
java.lang.String defaultValue)
Get an attribute value rendered as a string. |
Attributes |
getPrivateSet()
Get a private set that can be manipulated. |
boolean |
hasAttribute(java.lang.String n)
Check if it has an attribute. |
boolean |
isMultivalueAllowed()
Ask if multi-value is allowed. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.util.HashMap<java.lang.String,java.lang.String> mYAttributes
Constructor Detail |
---|
public AttributesReaderWrapper(java.util.HashMap<java.lang.String,java.lang.String> attributes)
Method Detail |
---|
public boolean isMultivalueAllowed()
isMultivalueAllowed
in interface AttributeReader
public NVImmutable getAttribute(java.lang.String n)
getAttribute
in interface AttributeReader
n
- name of the attribute
public java.lang.String getAttributeValueToString(java.lang.String n)
getAttributeValueToString
in interface AttributeReader
n
- name of the attribute
public java.lang.String getAttributeValueToString(java.lang.String n, java.lang.String defaultValue)
getAttributeValueToString
in interface AttributeReader
n
- name of the attributedefaultValue
- the value it will return if the name maps to a null.
public boolean hasAttribute(java.lang.String n)
hasAttribute
in interface AttributeReader
n
- name of the attribute
public java.util.Collection<NVImmutable> getAttributes(java.lang.String n)
getAttributes
in interface AttributeReader
n
- name of the attribute
public NVImmutable getAttribute(java.lang.String n, int index)
getAttribute
in interface AttributeReader
n
- name of the attributeindex
- the index of the attribute from 0.
public java.util.Collection<java.lang.String> getAttributeNames()
getAttributeNames
in interface AttributeReader
public java.util.Collection<NVImmutable> getAttributes()
This version is heavy.
getAttributes
in interface AttributeReader
public int getAttributeCount()
getAttributeCount
in interface AttributeReader
public int getAttributeCount(java.lang.String n)
getAttributeCount
in interface AttributeReader
n
- The name of the attribute.
public Attributes getPrivateSet()
getPrivateSet
in interface AttributeReader
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |