java.lang.Object | +--org.apache.commons.collections.CursorableLinkedListAll Implemented Interfaces:
java.util.LinkedList
transient List | A list of the currently CursorableLinkedList.Cursors currently open in this list. |
transient org.apache.commons.collections.CursorableLinkedList.Listable | A sentry node. |
transient int | Tracks the number of structural modifications to me. |
transient int | The number of elements in me. |
boolean | add(Object o) Appends the specified element to the end of this list. |
void | add(int index, Object element) Inserts the specified element at the specified position in this list. |
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. |
boolean | addAll(int index, Collection c) Inserts all of the elements in the specified collection into this list at the specified position. |
boolean | addFirst(Object o) Inserts the specified element at the beginning of this list. |
boolean | addLast(Object o) Inserts the specified element at the end of this list. |
void | broadcastListableChanged(org.apache.commons.collections.CursorableLinkedList.Listable elt) Informs all of my registered cursors that the specified element was changed. |
void | broadcastListableInserted(org.apache.commons.collections.CursorableLinkedList.Listable elt) Informs all of my registered cursors that the specified element was just added to my list. |
void | broadcastListableRemoved(org.apache.commons.collections.CursorableLinkedList.Listable elt) Informs all of my registered cursors that the specified element was just removed from my list. |
void | clear() Removes all of the elements from this list. |
boolean | contains(Object o) Returns true if this list contains the specified element. |
boolean | containsAll(Collection c) Returns true if this list contains all of the elements of the specified collection. |
cursor() Returns a ListIterator for iterating through the elements of this list. | |
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). | |
boolean | equals(Object o) Compares the specified object with this list for equality. |
Object | get(int index) Returns the element at the specified position in this list. |
Object | getFirst() Returns the element at the beginning of this list. |
Object | getLast() Returns the element at the end of this list. |
org.apache.commons.collections.CursorableLinkedList.Listable | getListableAt(int index) Returns the org.apache.commons.collections.CursorableLinkedList.Listable at the specified index. |
int | hashCode() Returns the hash code value for this list. |
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. |
org.apache.commons.collections.CursorableLinkedList.Listable | insertListable(org.apache.commons.collections.CursorableLinkedList.Listable before, org.apache.commons.collections.CursorableLinkedList.Listable after, Object value) Inserts a new value into my list, after the specified before element, and before the specified after element org.apache.commons.collections.CursorableLinkedList.Listable |
void | Informs all of my registered cursors that they are now invalid. |
boolean | isEmpty() Returns true if this list contains no elements. |
Iterator | iterator() Returns a fail-fast iterator. |
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. |
ListIterator | Returns a fail-fast ListIterator. |
ListIterator | listIterator(int index) Returns a fail-fast ListIterator. |
void | registerCursor(CursorableLinkedList.Cursor cur) Registers a CursorableLinkedList.Cursor to be notified of changes to this list. |
boolean | remove(Object o) Removes the first occurrence in this list of the specified element. |
Object | remove(int index) Removes the element at the specified position in this list (optional operation). |
boolean | removeAll(Collection c) Removes from this list all the elements that are contained in the specified collection. |
Object | Removes the first element of this list, if any. |
Object | Removes the last element of this list, if any. |
void | removeListable(org.apache.commons.collections.CursorableLinkedList.Listable elt) Removes the given org.apache.commons.collections.CursorableLinkedList.Listable from my list. |
boolean | retainAll(Collection c) Retains only the elements in this list that are contained in the specified collection. |
Object | set(int index, Object element) Replaces the element at the specified position in this list with the specified element. |
int | size() Returns the number of elements in this list. |
List | subList(int i, int j) Returns a fail-fast sublist. |
Object[] | toArray() Returns an array containing all of the elements in this list in proper sequence. |
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. |
String | toString() Returns a String representation of this list, suitable for debugging. |
void | unregisterCursor(CursorableLinkedList.Cursor cur) Removes a CursorableLinkedList.Cursor from the set of cursors to be notified of changes to this list. |
protected transient List _cursors
protected transient CursorableLinkedList.Listable _head
protected transient int _modCount
protected transient int _size
public void add(int index, Object element)
- if the class of the specified element
prevents it from being added to this list.
- if some aspect of the specified
element prevents it from being added to this list.
- if the index is out of range
(index < 0 || index > size()).public boolean add(Object o)
public boolean addAll(Collection c)
- if the class of an element in the specified
collection prevents it from being added to this list.
- if some aspect of an element in the
specified collection prevents it from being added to this
list.public boolean addAll(int index, Collection c)
- if the class of one of elements of the
specified collection prevents it from being added to this
list.
- if some aspect of one of elements of
the specified collection prevents it from being added to
this list.
- if the index is out of range (index
< 0 || index > size()).public boolean addFirst(Object o)
public boolean addLast(Object o)
protected void broadcastListableChanged(org.apache.commons.collections.CursorableLinkedList.Listable elt)
set(int,java.lang.Object)
protected void broadcastListableInserted(org.apache.commons.collections.CursorableLinkedList.Listable elt)
protected void broadcastListableRemoved(org.apache.commons.collections.CursorableLinkedList.Listable elt)
public void clear()
public boolean contains(Object o)
public boolean containsAll(Collection c)
public CursorableLinkedList.Cursor cursor()
cursor(int)
listIterator
CursorableLinkedList.Cursor
public CursorableLinkedList.Cursor cursor(int i)
- if the index is out of range (index
< 0 || index > size()).cursor
listIterator(int)
CursorableLinkedList.Cursor
public boolean equals(Object o)
public Object get(int index)
- if the index is out of range (index
< 0 || index >= size()).public Object getFirst()
public Object getLast()
protected CursorableLinkedList.Listable getListableAt(int index)
- if index is less than zero or
greater than or equal to the size of this list.public int hashCode()
hashCode = 1; Iterator i = list.iterator(); while (i.hasNext()) { Object obj = i.next(); hashCode = 31*hashCode + (obj==null ? 0 : obj.hashCode()); }This ensures that list1.equals(list2) implies that list1.hashCode()==list2.hashCode() for any two lists, list1 and list2, as required by the general contract of Object.hashCode.
Object.hashCode()
Object.equals(Object)
equals(Object)
public int indexOf(Object o)
protected CursorableLinkedList.Listable insertListable(org.apache.commons.collections.CursorableLinkedList.Listable before, org.apache.commons.collections.CursorableLinkedList.Listable after, Object value)
protected void invalidateCursors()
public boolean isEmpty()
public Iterator iterator()
List.iterator
public int lastIndexOf(Object o)
public ListIterator listIterator()
List.listIterator
public ListIterator listIterator(int index)
List.listIterator(int)
protected void registerCursor(CursorableLinkedList.Cursor cur)
public Object remove(int index)
- if the index is out of range (index
< 0 || index >= size()).public boolean remove(Object o)
public boolean removeAll(Collection c)
public Object removeFirst()
public Object removeLast()
protected void removeListable(org.apache.commons.collections.CursorableLinkedList.Listable elt)
public boolean retainAll(Collection c)
public Object set(int index, Object element)
- if the class of the specified element
prevents it from being added to this list.
- if some aspect of the specified
element prevents it from being added to this list.
- if the index is out of range
(index < 0 || index >= size()).public int size()
public List subList(int i, int j)
List.subList(int,int)
public Object[] toArray()
public Object[] toArray(Object[] a)
- if the runtime type of the specified array
is not a supertype of the runtime type of every element in
this list.public String toString()
protected void unregisterCursor(CursorableLinkedList.Cursor cur)