|
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.Objectjava.util.AbstractCollection
java.util.AbstractList
java.util.AbstractSequentialList
java.util.LinkedList
gov.nist.core.GenericObjectList
gov.nist.javax.sip.header.SIPObjectList
Root class for all the collection objects in this list: a wrapper class on the GenericObjectList class for lists of objects that can appear in SIPObjects. IMPORTANT NOTE: SIPObjectList cannot derive from SIPObject.
| Constructor Summary | |
SIPObjectList()
Construct an empty SIPObjectList. |
|
SIPObjectList(String lname)
Construct a SIPObject List given a list name. |
|
SIPObjectList(String lname,
Class cname)
Construct a SIPObject List given a list name and a class for the objects that go into the list. |
|
SIPObjectList(String lname,
String cname)
Construct a SIPObject List given a list name and a class for the objects that go into the list. |
|
| Method Summary | |
void |
add(SIPObject obj)
Add a new object to the list. |
void |
addFirst(SIPObject obj)
Add a new object to the top of this list. |
Object |
clone()
Make a clone of this header list and return it. |
void |
concatenate(SIPObjectList otherList)
Append a given list to the end of this list. |
void |
concatenate(SIPObjectList otherList,
boolean topFlag)
Append or prepend a given list to this list. |
String |
debugDump(int indent)
Convert to a string given an indentation(for pretty printing). |
GenericObject |
first()
Get the first object of this list. |
Class |
getMyClass()
Get the class of the supported objects of this list. |
void |
mergeObjects(GenericObjectList mergeList)
Do a merge of the GenericObjects contained in this list with the GenericObjects in the mergeList. |
GenericObject |
next()
Get the next object of this list (assumes that first() has been called prior to calling this method.) |
GenericObject |
next(ListIterator li)
Get the next object of this list. |
Object |
removeFirst()
Remove the first object of this list. |
Object |
removeLast()
Remove the last object from this list. |
void |
replace(String objectText,
GenericObject replacementObject,
boolean matchSubstring)
Do a recursive find and replace of objects pointed to by this object. |
void |
replace(String objectText,
GenericObjectList replacementObject,
boolean matchSubstring)
Do a recursive find and replace of objects pointed to by this object. |
void |
setMyClass(Class cl)
Set the class of the supported objects of this list. |
| Methods inherited from class gov.nist.core.GenericObjectList |
add, addFirst, debugDump, encode, equals, getIterator, isMySubclass, match, replace, replace, setSeparator, toString |
| Methods inherited from class java.util.LinkedList |
add, addAll, addAll, addLast, clear, contains, get, getFirst, getLast, indexOf, lastIndexOf, listIterator, remove, remove, 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 SIPObjectList(String lname)
lname - String to set
public SIPObjectList(String lname,
Class cname)
lname - String to setcname - Class to set
public SIPObjectList(String lname,
String cname)
lname - String to setcname - String to setpublic SIPObjectList()
| Method Detail |
public void add(SIPObject obj)
obj - SIPObject to setpublic void addFirst(SIPObject obj)
obj - SIPObject to setpublic Object clone()
clone in class GenericObjectListpublic void mergeObjects(GenericObjectList mergeList)
mergeObjects in class GenericObjectListmergeList - is the list of Generic objects that we want to do
an object by object merge with. Note that no new objects are
added to this list.public void concatenate(SIPObjectList otherList)
otherList - SIPObjectList to set
public void concatenate(SIPObjectList otherList,
boolean topFlag)
otherList - SIPObjectList to settopFlag - boolean to setpublic GenericObject first()
public Class getMyClass()
getMyClass in class GenericObjectListpublic GenericObject next()
public GenericObject next(ListIterator li)
li - ListIterator to set
public Object removeFirst()
public Object removeLast()
public String debugDump(int indent)
debugDump in class GenericObjectListindent - int to set
public void setMyClass(Class cl)
setMyClass in class GenericObjectListcl - Class to set
public void replace(String objectText,
GenericObject replacementObject,
boolean matchSubstring)
throws IllegalArgumentException
replace in class GenericObjectListobjectText - is the canonical string representation of
the object that we want to replace.replacementObject - is the object that we want to replace it
with (must be a subclass of GenericObject or GenericObjectList).matchSubstring - a boolean which tells if we should match
a substring of the target object
A replacement will occur if a portion of the structure is found
with matching encoded text as objectText and with the same class
as replacement.
(i.e. if matchSubstring is true an object is a candidate for
replacement if objectText is a substring of
candidate.encode() && candidate.class.equals(replacement.class)
otherwise the match test is an equality test.)
IllegalArgumentException - on null args or if
replacementObject does not derive from GenericObject or
GenericObjectList
public void replace(String objectText,
GenericObjectList replacementObject,
boolean matchSubstring)
throws IllegalArgumentException
replace in class GenericObjectListobjectText - is the canonical string representation of
the object that we want to replace.replacementObject - is the object that we want to replace it
with (must be a subclass of GenericObject or GenericObjectList).matchSubstring - a boolean which tells if we should match
a substring of the target object
A replacement will occur if a portion of the structure is found
with matching encoded text as objectText and with the same class
as replacement.
(i.e. if matchSubstring is true an object is a candidate for
replacement if objectText is a substring of
candidate.encode() && candidate.class.equals(replacement.class)
otherwise the match test is an equality test.)
IllegalArgumentException - on null args or if
replacementObject does not derive from GenericObject or
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 | ||||||||||