org.ws4d.java.structures
Class List

java.lang.Object
  extended by org.ws4d.java.structures.DataStructure
      extended by org.ws4d.java.structures.List
Direct Known Subclasses:
ArrayList, LinkedList, LockedList

public abstract class List
extends DataStructure


Constructor Summary
List()
           
 
Method Summary
 void add(int index, java.lang.Object obj)
           
 boolean add(java.lang.Object obj)
          Adds a new object to this data structure.
 boolean addAll(DataStructure data)
          Adds all objects contained within data to this instance.
 boolean addAll(int index, DataStructure data)
           
 boolean equals(java.lang.Object obj)
           
abstract  java.lang.Object get(int index)
           
 java.lang.String getClassShortName()
          Returns the short name of the class of this DataStructure instance.
 int indexOf(java.lang.Object o)
           
 Iterator iterator()
          Returns an iterator over all items stored within this data structure instance.
 int lastIndexOf(java.lang.Object object)
           
 ListIterator listIterator()
           
 ListIterator listIterator(int index)
           
 java.lang.Object remove(int index)
           
 java.lang.Object set(int index, java.lang.Object obj)
           
 int size()
          Returns the current size of the data structure.
 List subList(int fromIndex, int toIndex)
           
 
Methods inherited from class org.ws4d.java.structures.DataStructure
clear, contains, containsAll, hashCode, isEmpty, remove, toArray, toArray, toString
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

List

public List()
Method Detail

getClassShortName

public java.lang.String getClassShortName()
Description copied from class: DataStructure
Returns the short name of the class of this DataStructure instance.

Overrides:
getClassShortName in class DataStructure
Returns:
the short name of this data structure instance's class

add

public void add(int index,
                java.lang.Object obj)

add

public boolean add(java.lang.Object obj)
Description copied from class: DataStructure
Adds a new object to this data structure.

Overrides:
add in class DataStructure
Parameters:
obj - the object to add
Returns:
true if the object was actually added, false in any other case (e.g. adding an object to a set which already contains the same object in terms of java.lang.Object.equals(Object))

addAll

public boolean addAll(DataStructure data)
Description copied from class: DataStructure
Adds all objects contained within data to this instance.

Overrides:
addAll in class DataStructure
Parameters:
data - the objects to add
Returns:
true if at least one object from data was actually added, i.e. a modification was made to this instance, false in any other case (e.g. adding objects to a set which already contains them in terms of java.lang.Object.equals(Object))

addAll

public boolean addAll(int index,
                      DataStructure data)

get

public abstract java.lang.Object get(int index)

indexOf

public int indexOf(java.lang.Object o)

iterator

public Iterator iterator()
Description copied from class: DataStructure
Returns an iterator over all items stored within this data structure instance. The iterator will walk through the items in the natural order of this data structure; i.e. for a list-like structure this will be the same order as the one defined by the list.

Specified by:
iterator in class DataStructure
Returns:
an iterator over all stored objects

lastIndexOf

public int lastIndexOf(java.lang.Object object)

listIterator

public ListIterator listIterator()

listIterator

public ListIterator listIterator(int index)

remove

public java.lang.Object remove(int index)

set

public java.lang.Object set(int index,
                            java.lang.Object obj)

size

public int size()
Description copied from class: DataStructure
Returns the current size of the data structure.

Specified by:
size in class DataStructure
Returns:
the size of this data structure

subList

public List subList(int fromIndex,
                    int toIndex)

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object