gov.nist.core
クラス GenericObjectList

java.lang.Object
  上位を拡張 java.util.AbstractCollection
      上位を拡張 java.util.AbstractList
          上位を拡張 java.util.AbstractSequentialList
              上位を拡張 java.util.LinkedList
                  上位を拡張 gov.nist.core.GenericObjectList
すべての実装されたインタフェース:
java.io.Serializable, java.lang.Cloneable, java.lang.Iterable, java.util.Collection, java.util.List, java.util.Queue
直系の既知のサブクラス:
NameValueList, NetObjectList, SDPObjectList, SIPObjectList

public abstract class GenericObjectList
extends java.util.LinkedList
implements java.io.Serializable

Implements a homogenous consistent linked list. All the objects in the linked list must derive from the same root class. This is a useful constraint to place on our code as this property is invariant.The list is created with the superclass which can be specified as either a class name or a Class.

バージョン:
JAIN-SIP-1.1
作成者:
M. Ranganathan
This code is in the public domain.
関連項目:
直列化された形式

メソッドの概要
 boolean add(java.lang.Object obj)
           
 void addFirst(java.lang.Object objToAdd)
           
 java.lang.Object clone()
          Implement the clone method.
 java.lang.String debugDump()
          Convert this list of headers to a formatted string.
 java.lang.String debugDump(int indent)
          Convert this list of headers to a string (for printing) with an indentation given.
 java.lang.String encode()
          Encode the list in semicolon separated form.
 boolean equals(java.lang.Object other)
          Equality checking predicate.
 java.util.Iterator getIterator()
          Get the list iterator for this list.
 java.lang.Class getMyClass()
          Sets the class that all our elements derive from.
static boolean isMySubclass(java.lang.Class other)
           
 boolean match(java.lang.Object other)
          Match with a template (return true if we have a superset of the given template.
 void mergeObjects(GenericObjectList mergeList)
          Do a merge of the GenericObjects contained in this list with the GenericObjects in the mergeList.
 void replace(Match regexp, GenericObject replacementObject)
          Do a find and replace of objects in this list.
 void replace(Match regexp, GenericObjectList replacementObject)
          Do a find and replace of objects in this list.
 void replace(java.lang.String objectText, GenericObject replacementObject, boolean matchSubstring)
          Do a find and replace of objects in this list.
 void replace(java.lang.String objectText, GenericObjectList replacementObject, boolean matchSubstring)
          Do a find and replace of objects in this list.
 void setMyClass(java.lang.Class cl)
           
 void setSeparator(java.lang.String sep)
          Set the separator (for encoding the list)
 java.lang.String toString()
          Alias for the encode function above.
 
クラス java.util.LinkedList から継承されたメソッド
add, addAll, addAll, addLast, clear, contains, element, get, getFirst, getLast, indexOf, lastIndexOf, listIterator, offer, peek, poll, remove, remove, remove, removeFirst, removeLast, 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
 

メソッドの詳細

isMySubclass

public static boolean isMySubclass(java.lang.Class other)

clone

public java.lang.Object clone()
Implement the clone method.

オーバーライド:
クラス java.util.LinkedList 内の clone

getMyClass

public java.lang.Class getMyClass()
Sets the class that all our elements derive from.


setMyClass

public void setMyClass(java.lang.Class cl)

getIterator

public java.util.Iterator getIterator()
Get the list iterator for this list.


debugDump

public java.lang.String debugDump()
Convert this list of headers to a formatted string.


debugDump

public java.lang.String debugDump(int indent)
Convert this list of headers to a string (for printing) with an indentation given.


add

public boolean add(java.lang.Object obj)
定義:
インタフェース java.util.Collection 内の add
定義:
インタフェース java.util.List 内の add
オーバーライド:
クラス java.util.LinkedList 内の add

addFirst

public void addFirst(java.lang.Object objToAdd)
オーバーライド:
クラス java.util.LinkedList 内の addFirst

replace

public void replace(java.lang.String objectText,
                    GenericObject replacementObject,
                    boolean matchSubstring)
             throws java.lang.IllegalArgumentException
Do a find and replace of objects in this list.

パラメータ:
objectText - text of the object to find.
replacementObject - object to replace the target with ( in case a target is found).
matchSubstring - boolean that indicates whether to flag a match when objectText is a substring of a candidate object's encoded text.
例外:
java.lang.IllegalArgumentException

replace

public void replace(java.lang.String objectText,
                    GenericObjectList replacementObject,
                    boolean matchSubstring)
             throws java.lang.IllegalArgumentException
Do a find and replace of objects in this list.

パラメータ:
objectText - text of the object to find.
replacementObject - object to replace the target with (in case a target is found).
matchSubstring - boolean that indicates whether to flag a match when objectText is a substring of a candidate object's encoded text.
例外:
java.lang.IllegalArgumentException
導入されたバージョン:
v1.0

replace

public void replace(Match regexp,
                    GenericObjectList replacementObject)
             throws java.lang.IllegalArgumentException
Do a find and replace of objects in this list.

パラメータ:
regexp - regular expression to match with the canonical text we want to replace.
replacementObject - object to replace the target with (in case a target is found).
例外:
java.lang.IllegalArgumentException

replace

public void replace(Match regexp,
                    GenericObject replacementObject)
             throws java.lang.IllegalArgumentException
Do a find and replace of objects in this list.

パラメータ:
regexp - match regular expression of the object to find. this is generated using the org.apache.regexp package.
replacementObject - object to replace the target with ( in case a target is found).
例外:
java.lang.IllegalArgumentException

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.

パラメータ:
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.

encode

public java.lang.String encode()
Encode the list in semicolon separated form.

戻り値:
an encoded string containing the objects in this list.
導入されたバージョン:
v1.0

toString

public java.lang.String toString()
Alias for the encode function above.

オーバーライド:
クラス java.util.AbstractCollection 内の toString

setSeparator

public void setSeparator(java.lang.String sep)
Set the separator (for encoding the list)

パラメータ:
sep - is the new seperator (default is semicolon)
導入されたバージョン:
v1.0

equals

public boolean equals(java.lang.Object other)
Equality checking predicate.

定義:
インタフェース java.util.Collection 内の equals
定義:
インタフェース java.util.List 内の equals
オーバーライド:
クラス java.util.AbstractList 内の equals
パラメータ:
other - is the object to compare ourselves to.
戻り値:
true if the objects are equal.

match

public boolean match(java.lang.Object other)
Match with a template (return true if we have a superset of the given template. This can be used for partial match (template matching of SIP objects). Note -- this implementation is not unnecessarily efficient :-)

パラメータ:
other - template object to compare against.