|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.AbstractCollection<E>
java.util.AbstractList<E>
java.util.AbstractSequentialList<E>
de.cau.cs.kieler.core.util.ConcatenableList<E>
E
- type of contained objectspublic class ConcatenableList<E>
Implementation of doubly linked list that permits concatenation of two lists.
Field Summary |
---|
Fields inherited from class java.util.AbstractList |
---|
modCount |
Constructor Summary | |
---|---|
ConcatenableList()
Constructs an empty list. |
Method Summary | |
---|---|
boolean |
add(E e)
|
boolean |
addAll(Collection<? extends E> c)
Appends all of the elements in the specified collection to the end of this list, in the order that they are returned by the specified collection's iterator. |
boolean |
addAll(int index,
Collection<? extends E> c)
Inserts all of the elements in the specified collection into this list, starting at the specified position. |
void |
addFirst(E e)
Inserts the specified element at the beginning of this list. |
void |
addLast(E e)
Appends the specified element to the end of this list. |
void |
concatenate(ConcatenableList<E> other)
Concatenates the receiver with the given list. |
E |
getFirst()
Returns the first element in this list. |
E |
getLast()
Returns the last element in this list. |
ListIterator<E> |
listIterator(int index)
|
E |
removeFirst()
Removes and returns the first element from this list. |
E |
removeLast()
Removes and returns the last element from this list. |
int |
size()
|
Methods inherited from class java.util.AbstractSequentialList |
---|
add, get, iterator, remove, set |
Methods inherited from class java.util.AbstractList |
---|
clear, equals, hashCode, indexOf, lastIndexOf, listIterator, removeRange, subList |
Methods inherited from class java.util.AbstractCollection |
---|
contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toString |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.util.List |
---|
contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray |
Constructor Detail |
---|
public ConcatenableList()
Method Detail |
---|
public ListIterator<E> listIterator(int index)
listIterator
in interface List<E>
listIterator
in class AbstractSequentialList<E>
public int size()
size
in interface Collection<E>
size
in interface List<E>
size
in class AbstractCollection<E>
public boolean add(E e)
add
in interface Collection<E>
add
in interface List<E>
add
in class AbstractList<E>
public boolean addAll(Collection<? extends E> c)
addAll
in interface Collection<E>
addAll
in interface List<E>
addAll
in class AbstractCollection<E>
c
- collection containing elements to be added to this list
public boolean addAll(int index, Collection<? extends E> c)
addAll
in interface List<E>
addAll
in class AbstractSequentialList<E>
index
- index at which to insert the first element from the
specified collectionc
- collection containing elements to be added to this list
public void concatenate(ConcatenableList<E> other)
other
- list to concatenatepublic E getFirst()
public E getLast()
public void addFirst(E e)
e
- the element to addpublic void addLast(E e)
This method is equivalent to add(E)
.
e
- the element to addpublic E removeFirst()
public E removeLast()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |