public abstract class List extends DataStructure
| Modifier and Type | Field and Description |
|---|---|
protected int |
changes |
protected int |
size |
| Constructor and Description |
|---|
List() |
| Modifier and Type | Method and Description |
|---|---|
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 |
hashCode() |
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) |
clear, contains, containsAll, isEmpty, remove, toArray, toArray, toStringpublic java.lang.String getClassShortName()
DataStructureDataStructure instance.getClassShortName in class DataStructuredata structure instance's classpublic void add(int index,
java.lang.Object obj)
public boolean add(java.lang.Object obj)
DataStructureadd in class DataStructureobj - the object to addtrue 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))public boolean addAll(DataStructure data)
DataStructuredata to this instance.addAll in class DataStructuredata - the objects to addtrue 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))public boolean addAll(int index,
DataStructure data)
public abstract java.lang.Object get(int index)
public int indexOf(java.lang.Object o)
public Iterator iterator()
DataStructureiterator in class DataStructurepublic int lastIndexOf(java.lang.Object object)
public ListIterator listIterator()
public ListIterator listIterator(int index)
public java.lang.Object remove(int index)
public java.lang.Object set(int index,
java.lang.Object obj)
public int size()
DataStructuresize in class DataStructurepublic List subList(int fromIndex, int toIndex)
public boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class DataStructure