|
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
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.
Method Summary | |
boolean |
add(Object obj)
|
void |
addFirst(Object objToAdd)
|
Object |
clone()
Implement the clone method. |
String |
debugDump()
Convert this list of headers to a formatted string. |
String |
debugDump(int indent)
Convert this list of headers to a string (for printing) with an indentation given. |
String |
encode()
Encode the list in semicolon separated form. |
boolean |
equals(Object other)
Equality checking predicate. |
Iterator |
getIterator()
Get the list iterator for this list. |
Class |
getMyClass()
Sets the class that all our elements derive from. |
static boolean |
isMySubclass(Class other)
|
boolean |
match(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(String objectText,
GenericObject replacementObject,
boolean matchSubstring)
Do a find and replace of objects in this list. |
void |
replace(String objectText,
GenericObjectList replacementObject,
boolean matchSubstring)
Do a find and replace of objects in this list. |
void |
setMyClass(Class cl)
|
void |
setSeparator(String sep)
Set the separator (for encoding the list) |
String |
toString()
Alias for the encode function above. |
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 |
Method Detail |
public static boolean isMySubclass(Class other)
public Object clone()
clone
in class LinkedList
public Class getMyClass()
public void setMyClass(Class cl)
public Iterator getIterator()
public String debugDump()
public String debugDump(int indent)
public boolean add(Object obj)
add
in interface List
add
in class LinkedList
public void addFirst(Object objToAdd)
addFirst
in class LinkedList
public void replace(String objectText, GenericObject replacementObject, boolean matchSubstring) throws IllegalArgumentException
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.
IllegalArgumentException
public void replace(String objectText, GenericObjectList replacementObject, boolean matchSubstring) throws IllegalArgumentException
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.
IllegalArgumentException
public void replace(Match regexp, GenericObjectList replacementObject) throws IllegalArgumentException
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).
IllegalArgumentException
public void replace(Match regexp, GenericObject replacementObject) throws IllegalArgumentException
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).
IllegalArgumentException
public void mergeObjects(GenericObjectList mergeList)
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 String encode()
public String toString()
toString
in class AbstractCollection
public void setSeparator(String sep)
sep
- is the new seperator (default is semicolon)public boolean equals(Object other)
equals
in interface List
equals
in class AbstractList
public boolean match(Object other)
other
- template object to compare against.
|
NIST SIP Parser and Stack (v1.2) API | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |