|
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.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 setpublic SIPObjectList(String lname, Class cname)
lname
- String to setcname
- Class to setpublic 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 GenericObjectList
public void mergeObjects(GenericObjectList mergeList)
mergeObjects
in class GenericObjectList
mergeList
- 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 setpublic void concatenate(SIPObjectList otherList, boolean topFlag)
otherList
- SIPObjectList to settopFlag
- boolean to setpublic GenericObject first()
first
in class GenericObjectList
public Class getMyClass()
getMyClass
in class GenericObjectList
public GenericObject next()
next
in class GenericObjectList
public GenericObject next(ListIterator li)
next
in class GenericObjectList
li
- ListIterator to set
public Object removeFirst()
removeFirst
in class LinkedList
public Object removeLast()
removeLast
in class LinkedList
public String debugDump(int indent)
debugDump
in class GenericObjectList
indent
- int to set
public void setMyClass(Class cl)
setMyClass
in class GenericObjectList
cl
- Class to setpublic void replace(String objectText, GenericObject replacementObject, boolean matchSubstring) throws IllegalArgumentException
replace
in class GenericObjectList
objectText
- 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
GenericObjectListpublic void replace(String objectText, GenericObjectList replacementObject, boolean matchSubstring) throws IllegalArgumentException
replace
in class GenericObjectList
objectText
- 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 |