com.ibm.are.common
Class GenericList

java.lang.Object
  extended by java.util.AbstractCollection
      extended by java.util.AbstractList
          extended by java.util.AbstractSequentialList
              extended by java.util.LinkedList
                  extended by com.ibm.are.common.GenericList
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.lang.Iterable, java.util.Collection, java.util.Deque, java.util.List, java.util.Queue
Direct Known Subclasses:
StringList

public class GenericList
extends java.util.LinkedList

The GenericList class represents a list of items. The items in the list can be of any type, and the list contents can be heterogeneous.

Version:
1.0
Author:
IBM
See Also:
Serialized Form

Field Summary
static java.lang.String COPYRIGHT
          Copyright for class bytecode
static java.lang.String DEFAULT_LIST_END_MARKER
          The default end marker for a string representation of the list contents
static java.lang.String DEFAULT_LIST_ITEM_END_MARKER
          The default end marker for an item within the string representation of the list contents
static java.lang.String DEFAULT_LIST_ITEM_START_MARKER
          The default start marker for an item within the string representation of the list contents
static java.lang.String DEFAULT_LIST_START_MARKER
          The default start marker for a string representation of the list contents
protected  java.lang.String listEndMarker
          End marker for a string representation of the list contents
protected  java.lang.String listItemEndMarker
          End marker for an item within the string representation of the list contents
protected  java.lang.String listItemStartMarker
          Start marker for an item within the string representation of the list contents
protected  java.lang.String listStartMarker
          Start marker for a string representation of the list contents
protected  int maxInputListItems
          Maximum number of items the list can contain.
 
Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary
GenericList()
          Constructs a an empty GenericList object
GenericList(java.util.Collection c)
          Constructs a GenericList object and populates it with the contents of the specified collection.
GenericList(java.lang.Object[] objList)
          Constructs a GenericList object and populates it with the contents of the specified list.
 
Method Summary
 boolean equals(java.lang.Object o)
          Compares the list with the specified object.
 java.lang.String getListEndMarker()
          Retrieves the end marker for the string representation of this list
 java.lang.String getListItemEndMarker()
          Retrieves the end marker for an item within the string representation of this list
 java.lang.String getListItemStartMarker()
          Retrieves the start marker for an item within the string representation of this list
 java.lang.String getListStartMarker()
          Retrieves the start marker for the string representation of this list
protected  void initFields()
          Initializes the internal object fields.
 void setListEndMarker(java.lang.String listEndMarker)
          Sets the end marker for the string representation of this list
 void setListItemEndMarker(java.lang.String listItemEndMarker)
          Sets the end marker for an item within the string representation of this list
 void setListItemStartMarker(java.lang.String listItemStartMarker)
          Sets the start marker for an item within the string representation of this list
 void setListStartMarker(java.lang.String listStartMarker)
          Sets the start marker for the string representation of this list
 java.lang.String toString()
          Returns a string representation of the list contents
 
Methods inherited from class java.util.LinkedList
add, add, addAll, addAll, addFirst, addLast, clear, clone, 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
 
Methods inherited from class java.util.AbstractSequentialList
iterator
 
Methods inherited from class java.util.AbstractList
hashCode, listIterator, removeRange, subList
 
Methods inherited from class java.util.AbstractCollection
containsAll, isEmpty, removeAll, retainAll
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.List
containsAll, hashCode, isEmpty, iterator, listIterator, removeAll, retainAll, subList
 

Field Detail

COPYRIGHT

public static final java.lang.String COPYRIGHT
Copyright for class bytecode

See Also:
Constant Field Values

DEFAULT_LIST_START_MARKER

public static final java.lang.String DEFAULT_LIST_START_MARKER
The default start marker for a string representation of the list contents

See Also:
Constant Field Values

DEFAULT_LIST_END_MARKER

public static final java.lang.String DEFAULT_LIST_END_MARKER
The default end marker for a string representation of the list contents

See Also:
Constant Field Values

DEFAULT_LIST_ITEM_START_MARKER

public static final java.lang.String DEFAULT_LIST_ITEM_START_MARKER
The default start marker for an item within the string representation of the list contents

See Also:
Constant Field Values

DEFAULT_LIST_ITEM_END_MARKER

public static final java.lang.String DEFAULT_LIST_ITEM_END_MARKER
The default end marker for an item within the string representation of the list contents

See Also:
Constant Field Values

listStartMarker

protected java.lang.String listStartMarker
Start marker for a string representation of the list contents


listEndMarker

protected java.lang.String listEndMarker
End marker for a string representation of the list contents


listItemStartMarker

protected java.lang.String listItemStartMarker
Start marker for an item within the string representation of the list contents


listItemEndMarker

protected java.lang.String listItemEndMarker
End marker for an item within the string representation of the list contents


maxInputListItems

protected int maxInputListItems
Maximum number of items the list can contain. Default is 1,048,576 items.

Constructor Detail

GenericList

public GenericList()
Constructs a an empty GenericList object


GenericList

public GenericList(java.util.Collection c)
Constructs a GenericList object and populates it with the contents of the specified collection.

Parameters:
c - The collection to populate the list with

GenericList

public GenericList(java.lang.Object[] objList)
Constructs a GenericList object and populates it with the contents of the specified list.

Parameters:
objList - The list to populate the list with
Method Detail

getListEndMarker

public java.lang.String getListEndMarker()
Retrieves the end marker for the string representation of this list

Returns:
The end marker for the string representation of this list

setListEndMarker

public void setListEndMarker(java.lang.String listEndMarker)
Sets the end marker for the string representation of this list

Parameters:
listEndMarker - The end marker

getListItemEndMarker

public java.lang.String getListItemEndMarker()
Retrieves the end marker for an item within the string representation of this list

Returns:
The end marker for an item within the string representation of this list

setListItemEndMarker

public void setListItemEndMarker(java.lang.String listItemEndMarker)
Sets the end marker for an item within the string representation of this list

Parameters:
listItemEndMarker - The item end marker

getListItemStartMarker

public java.lang.String getListItemStartMarker()
Retrieves the start marker for an item within the string representation of this list

Returns:
The start marker for an item within the string representation of this list

setListItemStartMarker

public void setListItemStartMarker(java.lang.String listItemStartMarker)
Sets the start marker for an item within the string representation of this list

Parameters:
listItemStartMarker - The item start marker

getListStartMarker

public java.lang.String getListStartMarker()
Retrieves the start marker for the string representation of this list

Returns:
The start marker for the string representation of this list

setListStartMarker

public void setListStartMarker(java.lang.String listStartMarker)
Sets the start marker for the string representation of this list

Parameters:
listStartMarker - The start marker

equals

public boolean equals(java.lang.Object o)
Compares the list with the specified object. If all items in the list match all items in the specified object, without regard for ordering of the items within the lists, the two lists are considered equal.

Specified by:
equals in interface java.util.Collection
Specified by:
equals in interface java.util.List
Overrides:
equals in class java.util.AbstractList
Returns:
true if the two lists are equal, false if they are not

toString

public java.lang.String toString()
Returns a string representation of the list contents

Overrides:
toString in class java.util.AbstractCollection
Returns:
A string representation of the list contents

initFields

protected void initFields()
Initializes the internal object fields. This method is utilized during the initial construction of the object.