|
NIST SIP Parser and Stack (v1.2) API | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.util.AbstractCollection | +--java.util.AbstractList | +--java.util.AbstractSequentialList | +--java.util.LinkedList | +--gov.nist.core.GenericObjectList | +--gov.nist.core.NameValueList
Implements a simple NameValue association with a quick lookup function (via a hash table) this class is not thread safe because it uses HashTables.
Constructor Summary | |
NameValueList()
default constructor. |
|
NameValueList(String listName)
|
Method Summary | |
void |
add(NameValue nv)
|
boolean |
add(Object obj)
Generic add method (throws a class cast exception if anything but NameValue is added. |
void |
add(String name,
Object obj)
Add a name value record to this list. |
Object |
clone()
Implement the clone method. |
void |
concatenate(NameValueList other)
Grows this name-value list by adding all the elements from the other NameValue list. |
boolean |
delete(String name)
Remove the element corresponding to this name. |
boolean |
equals(Object otherObject)
Compare if two NameValue lists are equal. |
GenericObject |
first()
Get the first element of the list. |
Iterator |
getIterator()
Get the list iterator for this list. |
Iterator |
getNames()
Get a list of parameter names. |
NameValue |
getNameValue(String name)
Get the NameValue record given a name. |
String |
getParameter(String name)
Get the parameter as a String. |
Object |
getValue(String name)
Do a lookup on a given name and return value associated with it. |
boolean |
hasNameValue(String name)
Returns a boolean telling if this NameValueList has a record with this name |
void |
set(NameValue nv)
Set a namevalue object in this list. |
void |
set(String name,
Object value)
Set a namevalue object in this list. |
Methods inherited from class gov.nist.core.GenericObjectList |
addFirst, debugDump, debugDump, encode, getMyClass, isMySubclass, match, mergeObjects, replace, replace, replace, replace, setMyClass, setSeparator, toString |
Methods inherited from class java.util.LinkedList |
add, addAll, addAll, addLast, clear, contains, get, getFirst, getLast, indexOf, lastIndexOf, listIterator, remove, remove, removeFirst, removeLast, set, size, toArray, toArray |
Methods inherited from class java.util.AbstractSequentialList |
iterator |
Methods inherited from class java.util.AbstractList |
hashCode, listIterator, subList |
Methods inherited from class java.util.AbstractCollection |
containsAll, isEmpty, removeAll, retainAll |
Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.util.List |
containsAll, hashCode, isEmpty, iterator, listIterator, removeAll, retainAll, subList |
Constructor Detail |
public NameValueList(String listName)
public NameValueList()
Method Detail |
public void add(NameValue nv)
public void set(NameValue nv)
public void set(String name, Object value)
public boolean add(Object obj)
add
in interface List
add
in class GenericObjectList
public void add(String name, Object obj)
public boolean equals(Object otherObject)
equals
in interface List
equals
in class GenericObjectList
otherObject
- is the object to compare to.
public Object getValue(String name)
public NameValue getNameValue(String name)
public boolean hasNameValue(String name)
public boolean delete(String name)
public Iterator getIterator()
getIterator
in class GenericObjectList
public Iterator getNames()
public void concatenate(NameValueList other)
public Object clone()
GenericObjectList
clone
in class GenericObjectList
public String getParameter(String name)
public GenericObject first()
first
in class GenericObjectList
|
NIST SIP Parser and Stack (v1.2) API | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |