Method Summary |
|
public boolean | add(Object o) Appends the specified element to the end of this list.
Parameters: o - element to be appended to this list. |
public void | add(int index, Object element) Inserts the specified element at the specified position in this list. |
public boolean | addAll(Collection 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 . |
public boolean | addAll(int index, Collection c) Inserts all of the elements in the specified collection into this
list at the specified position. |
public boolean | addFirst(Object o) Inserts the specified element at the beginning of this list.
(Equivalent to
CursorableLinkedList.add(int,java.lang.Object) add(0,o) ).
Parameters: o - element to be prepended to this list. |
public boolean | addLast(Object o) Inserts the specified element at the end of this list.
(Equivalent to
CursorableLinkedList.add(java.lang.Object) ).
Parameters: o - element to be appended to this list. |
protected void | broadcastListableChanged(Listable elt) Informs all of my registered cursors that the specified
element was changed. |
protected void | broadcastListableInserted(Listable elt) Informs all of my registered cursors that the specified
element was just added to my list. |
protected void | broadcastListableRemoved(Listable elt) Informs all of my registered cursors that the specified
element was just removed from my list. |
public void | clear() Removes all of the elements from this list. |
public boolean | contains(Object o) Returns true if this list contains the specified element.
More formally, returns true if and only if this list contains
at least one element e such that
(o==null ? e==null : o.equals(e)).
Parameters: o - element whose presence in this list is to be tested. |
public boolean | containsAll(Collection c) Returns true if this list contains all of the elements of the
specified collection.
Parameters: c - collection to be checked for containment in this list. |
public CursorableLinkedList.Cursor | cursor() Returns a
ListIterator for iterating through the
elements of this list. |
public CursorableLinkedList.Cursor | cursor(int i) Returns a
ListIterator for iterating through the
elements of this list, initialized such that
ListIterator.next will return the element at
the specified index (if any) and
ListIterator.previous will return the element immediately preceding it (if any). |
public boolean | equals(Object o) Compares the specified object with this list for equality. |
public Object | get(int index) Returns the element at the specified position in this list.
Parameters: index - index of element to return. |
public Object | getFirst() Returns the element at the beginning of this list. |
public Object | getLast() Returns the element at the end of this list. |
protected Listable | getListableAt(int index) Returns the
org.apache.commons.collections.CursorableLinkedList.Listable
at the specified index. |
public int | hashCode() Returns the hash code value for this list. |
public int | indexOf(Object o) Returns the index in this list of the first occurrence of the specified
element, or -1 if this list does not contain this element.
More formally, returns the lowest index i such that
(o==null ? get(i)==null : o.equals(get(i))),
or -1 if there is no such index.
Parameters: o - element to search for. |
protected Listable | insertListable(Listable before, Listable after, Object value) |
protected void | invalidateCursors() Informs all of my registered cursors that they are now
invalid. |
public boolean | isEmpty() Returns true if this list contains no elements. |
public Iterator | iterator() Returns a fail-fast iterator. |
public int | lastIndexOf(Object o) Returns the index in this list of the last occurrence of the specified
element, or -1 if this list does not contain this element.
More formally, returns the highest index i such that
(o==null ? get(i)==null : o.equals(get(i))),
or -1 if there is no such index.
Parameters: o - element to search for. |
public ListIterator | listIterator() Returns a fail-fast ListIterator. |
public ListIterator | listIterator(int index) Returns a fail-fast ListIterator. |
protected void | registerCursor(Cursor cur) Registers a
CursorableLinkedList.Cursor to be notified
of changes to this list. |
public boolean | remove(Object o) Removes the first occurrence in this list of the specified element.
If this list does not contain the element, it is
unchanged. |
public Object | remove(int index) Removes the element at the specified position in this list (optional
operation). |
public boolean | removeAll(Collection c) Removes from this list all the elements that are contained in the
specified collection.
Parameters: c - collection that defines which elements will be removed fromthis list. |
public Object | removeFirst() Removes the first element of this list, if any. |
public Object | removeLast() Removes the last element of this list, if any. |
protected void | removeListable(Listable elt) Removes the given
org.apache.commons.collections.CursorableLinkedList.Listable
from my list. |
public boolean | retainAll(Collection c) Retains only the elements in this list that are contained in the
specified collection. |
public Object | set(int index, Object element) Replaces the element at the specified position in this list with the
specified element.
Parameters: index - index of element to replace. Parameters: element - element to be stored at the specified position. |
public int | size() Returns the number of elements in this list. |
public List | subList(int i, int j) Returns a fail-fast sublist. |
public Object[] | toArray() Returns an array containing all of the elements in this list in proper
sequence. |
public Object[] | toArray(Object a) Returns an array containing all of the elements in this list in proper
sequence; the runtime type of the returned array is that of the
specified array. |
public String | toString() Returns a
String representation of this list, suitable for debugging. |
protected void | unregisterCursor(Cursor cur) Removes a
CursorableLinkedList.Cursor from
the set of cursors to be notified of changes to this list. |