org.geworkbench.bison.datastructure.complex.panels
Class CSSequentialItemList<T extends DSSequential>

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractList<E>
          extended by java.util.ArrayList<T>
              extended by org.geworkbench.bison.datastructure.complex.panels.CSItemList<T>
                  extended by org.geworkbench.bison.datastructure.complex.panels.CSSequentialItemList<T>
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.lang.Iterable<T>, java.util.Collection<T>, java.util.List<T>, java.util.RandomAccess, DSItemList<T>, DSIdentifiable
Direct Known Subclasses:
CSDataSet, CSMarkerVector

public class CSSequentialItemList<T extends DSSequential>
extends CSItemList<T>

An item list that maintains a list of items in which each item is aware of its own position in the list.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary
CSSequentialItemList()
          Create a new CSSequentialItemList.
 
Method Summary
 void add(int index, T item)
          Adds the item to the sequential item list.
 boolean add(T item)
          Adds the item to the sequential item list.
 boolean remove(java.lang.Object item)
          Removes the given item from the item list.
 
Methods inherited from class org.geworkbench.bison.datastructure.complex.panels.CSItemList
addAll, clear, equals, get, getID, hashCode, set, setID, setLabel
 
Methods inherited from class java.util.ArrayList
addAll, clone, contains, ensureCapacity, get, indexOf, isEmpty, lastIndexOf, remove, removeRange, size, toArray, toArray, trimToSize
 
Methods inherited from class java.util.AbstractList
iterator, listIterator, listIterator, subList
 
Methods inherited from class java.util.AbstractCollection
containsAll, removeAll, retainAll, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.List
addAll, contains, containsAll, get, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, removeAll, retainAll, size, subList, toArray, toArray
 

Constructor Detail

CSSequentialItemList

public CSSequentialItemList()
Create a new CSSequentialItemList.

Method Detail

add

public boolean add(T item)
Adds the item to the sequential item list.

Specified by:
add in interface java.util.Collection<T extends DSSequential>
Specified by:
add in interface java.util.List<T extends DSSequential>
Overrides:
add in class CSItemList<T extends DSSequential>
Parameters:
item - the item to add.
Returns:
true always.

add

public void add(int index,
                T item)
Adds the item to the sequential item list. watkin - note: this violates the contract for List-- it does not add if index < size(), but replaces!

Specified by:
add in interface java.util.List<T extends DSSequential>
Overrides:
add in class CSItemList<T extends DSSequential>
Parameters:
index - the index at which to insert the item, 0 <= index <= size();
item - the item to insert.

remove

public boolean remove(java.lang.Object item)
Removes the given item from the item list.

Specified by:
remove in interface java.util.Collection<T extends DSSequential>
Specified by:
remove in interface java.util.List<T extends DSSequential>
Overrides:
remove in class CSItemList<T extends DSSequential>
Parameters:
item - the item to remove.
Returns:
true if the item was found and removed, false if the item was not found.