gov.nist.javax.sip.header
クラス SIPObjectList

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
すべての実装されたインタフェース:
java.io.Serializable, java.lang.Cloneable, java.lang.Iterable, java.util.Collection, java.util.List, java.util.Queue

public class SIPObjectList
extends GenericObjectList

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.

バージョン:
JAIN-SIP-1.1 $Revision: 1.2 $ $Date: 2004/01/22 13:26:29 $
作成者:
M. Ranganathan
This code is in the public domain.
関連項目:
直列化された形式

コンストラクタの概要
SIPObjectList()
          Construct an empty SIPObjectList.
SIPObjectList(java.lang.String lname)
          Construct a SIPObject List given a list name.
SIPObjectList(java.lang.String lname, java.lang.Class cname)
          Construct a SIPObject List given a list name and a class for the objects that go into the list.
SIPObjectList(java.lang.String lname, java.lang.String cname)
          Construct a SIPObject List given a list name and a class for the objects that go into the list.
 
メソッドの概要
 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.
 java.lang.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.
 java.lang.String debugDump(int indent)
          Convert to a string given an indentation(for pretty printing).
 GenericObject first()
          Get the first object of this list.
 java.lang.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(java.util.ListIterator li)
          Get the next object of this list.
 java.lang.Object removeFirst()
          Remove the first object of this list.
 java.lang.Object removeLast()
          Remove the last object from this list.
 void replace(java.lang.String objectText, GenericObject replacementObject, boolean matchSubstring)
          Do a recursive find and replace of objects pointed to by this object.
 void replace(java.lang.String objectText, GenericObjectList replacementObject, boolean matchSubstring)
          Do a recursive find and replace of objects pointed to by this object.
 void setMyClass(java.lang.Class cl)
          Set the class of the supported objects of this list.
 
クラス gov.nist.core.GenericObjectList から継承されたメソッド
add, addFirst, debugDump, encode, equals, getIterator, isMySubclass, match, replace, replace, setSeparator, toString
 
クラス java.util.LinkedList から継承されたメソッド
add, addAll, addAll, addLast, clear, contains, element, get, getFirst, getLast, indexOf, lastIndexOf, listIterator, offer, peek, poll, remove, remove, remove, set, size, toArray, toArray
 
クラス java.util.AbstractSequentialList から継承されたメソッド
iterator
 
クラス java.util.AbstractList から継承されたメソッド
hashCode, listIterator, subList
 
クラス java.util.AbstractCollection から継承されたメソッド
containsAll, isEmpty, removeAll, retainAll
 
クラス java.lang.Object から継承されたメソッド
getClass, notify, notifyAll, wait, wait, wait
 
インタフェース java.util.List から継承されたメソッド
containsAll, hashCode, isEmpty, iterator, listIterator, removeAll, retainAll, subList
 

コンストラクタの詳細

SIPObjectList

public SIPObjectList(java.lang.String lname)
Construct a SIPObject List given a list name.

パラメータ:
lname - String to set

SIPObjectList

public SIPObjectList(java.lang.String lname,
                     java.lang.Class cname)
Construct a SIPObject List given a list name and a class for the objects that go into the list.

パラメータ:
lname - String to set
cname - Class to set

SIPObjectList

public SIPObjectList(java.lang.String lname,
                     java.lang.String cname)
Construct a SIPObject List given a list name and a class for the objects that go into the list.

パラメータ:
lname - String to set
cname - String to set

SIPObjectList

public SIPObjectList()
Construct an empty SIPObjectList.

メソッドの詳細

add

public void add(SIPObject obj)
Add a new object to the list.

パラメータ:
obj - SIPObject to set

addFirst

public void addFirst(SIPObject obj)
Add a new object to the top of this list.

パラメータ:
obj - SIPObject to set

clone

public java.lang.Object clone()
Make a clone of this header list and return it. For any object in the list (like SIPHeaders) that inherits from GenericObject or GenericObjectList, clone the object and add it to the returned List. For objects that do not, this just copies the reference over. WARNING.. NO CIRCULAR REFERENCES that are accessible are tolerated (will throw this method into an infinite loop). However, we dont (shouldnt) have such worries because the parser generates tree sturctures. This belongs here and not in the superclass because we need to directly access protected fields.

オーバーライド:
クラス GenericObjectList 内の clone
戻り値:
clone of this header
導入されたバージョン:
1.0

mergeObjects

public void mergeObjects(GenericObjectList mergeList)
Do a merge of the GenericObjects contained in this list with the GenericObjects in the mergeList. Note that this does an inplace modification of the given list. This does an object by object merge of the given objects.

オーバーライド:
クラス GenericObjectList 内の mergeObjects
パラメータ:
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.

concatenate

public void concatenate(SIPObjectList otherList)
Append a given list to the end of this list.

パラメータ:
otherList - SIPObjectList to set

concatenate

public void concatenate(SIPObjectList otherList,
                        boolean topFlag)
Append or prepend a given list to this list.

パラメータ:
otherList - SIPObjectList to set
topFlag - boolean to set

first

public GenericObject first()
Get the first object of this list.

戻り値:
GenericObject

getMyClass

public java.lang.Class getMyClass()
Get the class of the supported objects of this list.

オーバーライド:
クラス GenericObjectList 内の getMyClass
戻り値:
Class

next

public GenericObject next()
Get the next object of this list (assumes that first() has been called prior to calling this method.)

戻り値:
GenericObject

next

public GenericObject next(java.util.ListIterator li)
Get the next object of this list.

パラメータ:
li - ListIterator to set
戻り値:
GenericObject

removeFirst

public java.lang.Object removeFirst()
Remove the first object of this list.

オーバーライド:
クラス java.util.LinkedList 内の removeFirst
戻り値:
Object removed

removeLast

public java.lang.Object removeLast()
Remove the last object from this list.

オーバーライド:
クラス java.util.LinkedList 内の removeLast
戻り値:
Object removed

debugDump

public java.lang.String debugDump(int indent)
Convert to a string given an indentation(for pretty printing). This is useful for debugging the system in lieu of a debugger.

オーバーライド:
クラス GenericObjectList 内の debugDump
パラメータ:
indent - int to set
戻り値:
an indentation

setMyClass

public void setMyClass(java.lang.Class cl)
Set the class of the supported objects of this list.

オーバーライド:
クラス GenericObjectList 内の setMyClass
パラメータ:
cl - Class to set

replace

public void replace(java.lang.String objectText,
                    GenericObject replacementObject,
                    boolean matchSubstring)
             throws java.lang.IllegalArgumentException
Do a recursive find and replace of objects pointed to by this object. You might find this handy if you are writing a proxy server.

オーバーライド:
クラス GenericObjectList 内の replace
パラメータ:
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.)
例外:
java.lang.IllegalArgumentException - on null args or if replacementObject does not derive from GenericObject or GenericObjectList

replace

public void replace(java.lang.String objectText,
                    GenericObjectList replacementObject,
                    boolean matchSubstring)
             throws java.lang.IllegalArgumentException
Do a recursive find and replace of objects pointed to by this object.

オーバーライド:
クラス GenericObjectList 内の replace
パラメータ:
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.)
例外:
java.lang.IllegalArgumentException - on null args or if replacementObject does not derive from GenericObject or GenericObjectList