|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.util.AbstractCollection | +--java.util.AbstractList | +--java.util.Vector | +--context.arch.storage.AttributeNameValues
This class is a container for a group of related attributes. It contains information about attribute names, values and types AttributeNameValues can be added, removed, and found in the container.
Field Summary | |
static java.lang.String |
ALL
Tag to indicate all attributes are to be used |
static java.lang.String |
ATTRIBUTE_NAME_VALUES
Tag for a list of attribute name/value pairs |
static char |
SEPARATOR
Connector for nested attributes |
static java.lang.String |
SEPARATOR_STRING
Connector for nested attributes - String |
Fields inherited from class java.util.Vector |
capacityIncrement,
elementCount,
elementData |
Fields inherited from class java.util.AbstractList |
modCount |
Constructor Summary | |
AttributeNameValues()
Empty constructor |
|
AttributeNameValues(DataObject data)
Constructor that takes a DataObject as a parameter. |
Method Summary | |
void |
addAttributeNameValue(AttributeNameValue att)
Adds the given AttributeNameValue object to the container. |
void |
addAttributeNameValue(java.lang.String name)
Adds the given attribute name. |
void |
addAttributeNameValue(java.lang.String name,
java.lang.Object value)
Adds the given attribute name and value to the container. |
void |
addAttributeNameValue(java.lang.String name,
java.lang.Object value,
java.lang.String type)
Adds the given attribute name, value and type to the container |
void |
addAttributeNameValues(AttributeNameValues atts)
Adds the given AttributeNameValues object to the container. |
AttributeNameValue |
getAttributeNameValue(java.lang.String name)
This method returns the AttributeNameValue with the given name from this list of AttributeNameValues. |
AttributeNameValue |
getAttributeNameValue(java.lang.String name,
java.lang.String prefix)
This method returns the AttributeNameValue with the given name from this list of AttributeNameValue. |
AttributeNameValue |
getAttributeNameValueAt(int index)
Returns the AttributeNameValue object at the given index |
AttributeNameValues |
getSubset(Attributes atts)
This method takes a list of attributes wanted and it filters all the rest out from this Attributes object. |
boolean |
hasAttributeNameValue(AttributeNameValue att)
Determines whether the given AttributeNameValue object is in the container |
boolean |
hasAttributeNameValue(java.lang.String name,
java.lang.Object value)
Determines whether the given attribute name and value are in the container, using the default datatype. |
boolean |
hasAttributeNameValue(java.lang.String name,
java.lang.Object value,
java.lang.String type)
Determines whether the given attribute name, value and type are in the container, |
int |
indexOfAttributeNameValue(AttributeNameValue att)
Returns the index at which the AttributeNameValue object occurs |
int |
indexOfAttributeNameValue(java.lang.String name,
java.lang.Object value)
Returns the index at which the given attribute name and value occurs, using the default datatype |
int |
indexOfAttributeNameValue(java.lang.String name,
java.lang.Object value,
java.lang.String type)
Returns the index at which the given attribute name, value and type occurs. |
int |
numAttributeNameValues()
Returns the number of AttributeNameValues in the container return the number of AttributeNameValues in the container |
void |
removeAttributeNameValue(AttributeNameValue att)
Removes the given AttributeNameValue object to the container. |
java.lang.String |
toAString()
A printable version of this class. |
DataObject |
toDataObject()
Converts to a DataObject. |
java.util.Hashtable |
toTypesHashtable()
Converts the attributes name-type pairs to a hashtable where the keys are the names and the values are the types. |
java.util.Hashtable |
toTypesHashtable(java.lang.String prefix)
Converts the attributes name-type pairs to a hashtable where the keys are the names and the values are the types. |
Methods inherited from class java.util.Vector |
add,
add,
addAll,
addAll,
addElement,
capacity,
clear,
clone,
contains,
containsAll,
copyInto,
elementAt,
elements,
ensureCapacity,
equals,
firstElement,
get,
hashCode,
indexOf,
indexOf,
insertElementAt,
isEmpty,
lastElement,
lastIndexOf,
lastIndexOf,
remove,
remove,
removeAll,
removeAllElements,
removeElement,
removeElementAt,
removeRange,
retainAll,
set,
setElementAt,
setSize,
size,
subList,
toArray,
toArray,
toString,
trimToSize |
Methods inherited from class java.util.AbstractList |
iterator,
listIterator,
listIterator |
Methods inherited from class java.lang.Object |
finalize,
getClass,
notify,
notifyAll,
wait,
wait,
wait |
Field Detail |
public static final java.lang.String ATTRIBUTE_NAME_VALUES
public static final char SEPARATOR
public static final java.lang.String SEPARATOR_STRING
public static final java.lang.String ALL
Constructor Detail |
public AttributeNameValues()
public AttributeNameValues(DataObject data)
data
- DataObject that contains the attribute name-value (and possibly type) infoMethod Detail |
public DataObject toDataObject()
public void addAttributeNameValue(AttributeNameValue att)
att
- AttributeNameValue to addpublic void addAttributeNameValue(java.lang.String name)
name
- Name of the attribute to addpublic void addAttributeNameValue(java.lang.String name, java.lang.Object value)
name
- Name of the attribute to addvalue
- Value of the attribute to addpublic void addAttributeNameValue(java.lang.String name, java.lang.Object value, java.lang.String type)
name
- Name of the attribute to addvalue
- Value of the attribute to addtype
- Datatype of the attribute to addpublic void addAttributeNameValues(AttributeNameValues atts)
atts
- AttributeNameValues to addpublic AttributeNameValue getAttributeNameValueAt(int index)
index
- Index into the containerpublic boolean hasAttributeNameValue(AttributeNameValue att)
att
- AttributeNameValue to checkpublic boolean hasAttributeNameValue(java.lang.String name, java.lang.Object value)
name
- Name of the attribute to checkvalue
- Value of the attribute to checkpublic boolean hasAttributeNameValue(java.lang.String name, java.lang.Object value, java.lang.String type)
name
- Name of the attribute to checkvalue
- Value of the attribute to checktype
- Datatype of the attribute to checkpublic int indexOfAttributeNameValue(AttributeNameValue att)
att
- AttributeNameValue to look forpublic int indexOfAttributeNameValue(java.lang.String name, java.lang.Object value)
name
- Name of the attribute to look forvalue
- Value of the attribute to look forpublic int indexOfAttributeNameValue(java.lang.String name, java.lang.Object value, java.lang.String type)
name
- Name of the attribute to look forvalue
- Value of the attribute to look fortype
- Datatype of the attribute to look forpublic int numAttributeNameValues()
public void removeAttributeNameValue(AttributeNameValue att)
att
- AttributeNameValue to removepublic AttributeNameValue getAttributeNameValue(java.lang.String name)
name
- of the AttributeNameValue to returnpublic AttributeNameValue getAttributeNameValue(java.lang.String name, java.lang.String prefix)
name
- of the AttributeNameValue to returnprefix
- Structure name to usepublic AttributeNameValues getSubset(Attributes atts)
atts
- Attributes object containing the attributes to returnpublic java.util.Hashtable toTypesHashtable()
public java.util.Hashtable toTypesHashtable(java.lang.String prefix)
public java.lang.String toAString()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |