public abstract class GenericObjectList extends LinkedList<GenericObject> implements Serializable, Cloneable
Modifier and Type | Field and Description |
---|---|
protected static String |
AND |
protected static String |
AT |
protected static String |
COLON |
protected static String |
COMMA |
protected static String |
DOT |
protected static String |
DOUBLE_QUOTE |
protected static String |
EQUALS |
protected static String |
GREATER_THAN |
protected static String |
HT |
protected int |
indentation |
protected static String |
LESS_THAN |
protected String |
listName |
protected static String |
LPAREN |
protected Class<?> |
myClass |
protected static String |
NEWLINE |
protected static String |
PERCENT |
protected static String |
POUND |
protected static String |
QUESTION |
protected static String |
QUOTE |
protected static String |
RETURN |
protected static String |
RPAREN |
protected static String |
SEMICOLON |
protected static String |
SLASH |
protected static String |
SP |
protected static String |
STAR |
modCount
Modifier | Constructor and Description |
---|---|
protected |
GenericObjectList() |
protected |
GenericObjectList(String lname) |
protected |
GenericObjectList(String lname,
Class objclass)
A Constructor which takes a list name and a class (for assertion
checking).
|
protected |
GenericObjectList(String lname,
String classname)
A Constructor which takes a list name and a class name (for assertion
checking).
|
Modifier and Type | Method and Description |
---|---|
void |
addFirst(GenericObject objToAdd) |
Object |
clone()
Makes a deep clone of this list.
|
protected void |
concatenate(GenericObjectList objList)
Concatenate two compatible header lists, adding the argument to the tail
end of this list.
|
protected void |
concatenate(GenericObjectList objList,
boolean topFlag)
Concatenate two compatible header lists, adding the argument either to
the beginning or the tail end of this list.
|
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.
|
protected GenericObject |
first()
This is the default list iterator.This will not handle nested list
traversal.
|
protected String |
getIndentation() |
int |
hashCode()
Hash code.
|
protected static boolean |
isCloneable(Object obj)
Return true if this supports reflection based cloning.
|
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.
|
protected GenericObject |
next()
Fetch the next object from the list based on the default list iterator
|
protected GenericObject |
next(ListIterator iterator)
Traverse the list given a list iterator
|
void |
setMyClass(Class cl) |
String |
toString()
Alias for the encode function above.
|
add, add, addAll, addAll, addLast, clear, contains, descendingIterator, element, get, getFirst, getLast, indexOf, lastIndexOf, listIterator, offer, offerFirst, offerLast, peek, peekFirst, peekLast, poll, pollFirst, pollLast, pop, push, remove, remove, remove, removeFirst, removeFirstOccurrence, removeLast, removeLastOccurrence, set, size, toArray, toArray
iterator
listIterator, removeRange, subList
containsAll, isEmpty, removeAll, retainAll
finalize, getClass, notify, notifyAll, wait, wait, wait
containsAll, isEmpty, iterator, listIterator, removeAll, retainAll, subList
protected static final String SEMICOLON
protected static final String COLON
protected static final String COMMA
protected static final String SLASH
protected static final String SP
protected static final String EQUALS
protected static final String STAR
protected static final String NEWLINE
protected static final String RETURN
protected static final String LESS_THAN
protected static final String GREATER_THAN
protected static final String AT
protected static final String DOT
protected static final String QUESTION
protected static final String POUND
protected static final String AND
protected static final String LPAREN
protected static final String RPAREN
protected static final String DOUBLE_QUOTE
protected static final String QUOTE
protected static final String HT
protected static final String PERCENT
protected int indentation
protected String listName
protected Class<?> myClass
protected GenericObjectList()
protected GenericObjectList(String lname)
protected GenericObjectList(String lname, String classname)
protected String getIndentation()
protected static boolean isCloneable(Object obj)
public static boolean isMySubclass(Class<?> other)
public Object clone()
clone
in class LinkedList<GenericObject>
public void setMyClass(Class cl)
protected GenericObject next(ListIterator iterator)
protected GenericObject first()
protected GenericObject next()
protected void concatenate(GenericObjectList objList)
var
- topFlag set to true to add items to top of listprotected void concatenate(GenericObjectList objList, boolean topFlag)
var
- topFlag set to true to add items to top of list else
add them to the tail end of the list.public String debugDump()
public String debugDump(int indent)
public void addFirst(GenericObject objToAdd)
addFirst
in interface Deque<GenericObject>
addFirst
in class LinkedList<GenericObject>
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<GenericObject>
public int hashCode()
hashCode
in interface Collection<GenericObject>
hashCode
in interface List<GenericObject>
hashCode
in class AbstractList<GenericObject>
public boolean equals(Object other)
equals
in interface Collection<GenericObject>
equals
in interface List<GenericObject>
equals
in class AbstractList<GenericObject>
other
- is the object to compare ourselves to.public boolean match(Object other)
other
- template object to compare against.Copyright © 2018. All Rights Reserved.