|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectthings.data.impl.ReadableAttributes
public class ReadableAttributes
A set of readable attributes.
Version History
EPG - Initial - 23 AUG 05
Field Summary | |
---|---|
protected java.util.Hashtable<java.lang.String,java.util.LinkedList<NVImmutable>> |
mYAttributes
Attributes, if needed. |
Constructor Summary | |
---|---|
ReadableAttributes()
|
Method Summary | |
---|---|
java.lang.Object |
get()
Get the underlying attribute data. |
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. |
void |
set(java.lang.Object o)
Set the underlying attribute data. |
protected void |
validateAttributes()
Check to see if attributes were defined. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.util.Hashtable<java.lang.String,java.util.LinkedList<NVImmutable>> mYAttributes
Constructor Detail |
---|
public ReadableAttributes()
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
public java.lang.Object get()
public void set(java.lang.Object o) throws ThingsException
ThingsException
protected void validateAttributes()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |