class CursorableSubList extends CursorableLinkedList implements java.util.List
CursorableLinkedList.Cursor, CursorableLinkedList.Listable, CursorableLinkedList.ListIter| Modifier and Type | Field and Description |
|---|---|
protected CursorableLinkedList |
_list
Deprecated.
My underlying list
|
protected CursorableLinkedList.Listable |
_post
Deprecated.
The element in my underlying list following the last element in my list.
|
protected CursorableLinkedList.Listable |
_pre
Deprecated.
The element in my underlying list preceding the first element in my list.
|
_cursors, _head, _modCount, _size| Constructor and Description |
|---|
CursorableSubList(CursorableLinkedList list,
int from,
int to)
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(int index,
java.lang.Object element)
Deprecated.
Inserts the specified element at the specified position in this list.
|
boolean |
add(java.lang.Object o)
Deprecated.
Appends the specified element to the end of this list.
|
boolean |
addAll(java.util.Collection c)
Deprecated.
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,
java.util.Collection c)
Deprecated.
Inserts all of the elements in the specified collection into this
list at the specified position.
|
boolean |
addFirst(java.lang.Object o)
Deprecated.
Inserts the specified element at the beginning of this list.
|
boolean |
addLast(java.lang.Object o)
Deprecated.
Inserts the specified element at the end of this list.
|
protected void |
checkForComod()
Deprecated.
Test to see if my underlying list has been modified
by some other process.
|
void |
clear()
Deprecated.
Removes all of the elements from this list.
|
boolean |
contains(java.lang.Object o)
Deprecated.
Returns true if this list contains the specified element.
|
boolean |
containsAll(java.util.Collection c)
Deprecated.
Returns true if this list contains all of the elements of the
specified collection.
|
boolean |
equals(java.lang.Object o)
Deprecated.
Compares the specified object with this list for equality.
|
java.lang.Object |
get(int index)
Deprecated.
Returns the element at the specified position in this list.
|
java.lang.Object |
getFirst()
Deprecated.
Returns the element at the beginning of this list.
|
java.lang.Object |
getLast()
Deprecated.
Returns the element at the end of this list.
|
int |
hashCode()
Deprecated.
Returns the hash code value for this list.
|
int |
indexOf(java.lang.Object o)
Deprecated.
Returns the index in this list of the first occurrence of the specified
element, or -1 if this list does not contain this element.
|
protected CursorableLinkedList.Listable |
insertListable(CursorableLinkedList.Listable before,
CursorableLinkedList.Listable after,
java.lang.Object value)
Deprecated.
Inserts a new value into my
list, after the specified before element, and before the
specified after element
|
boolean |
isEmpty()
Deprecated.
Returns true if this list contains no elements.
|
java.util.Iterator |
iterator()
Deprecated.
Returns a fail-fast iterator.
|
int |
lastIndexOf(java.lang.Object o)
Deprecated.
Returns the index in this list of the last occurrence of the specified
element, or -1 if this list does not contain this element.
|
java.util.ListIterator |
listIterator()
Deprecated.
Returns a fail-fast ListIterator.
|
java.util.ListIterator |
listIterator(int index)
Deprecated.
Returns a fail-fast ListIterator.
|
java.lang.Object |
remove(int index)
Deprecated.
Removes the element at the specified position in this list (optional
operation).
|
boolean |
remove(java.lang.Object o)
Deprecated.
Removes the first occurrence in this list of the specified element.
|
boolean |
removeAll(java.util.Collection c)
Deprecated.
Removes from this list all the elements that are contained in the
specified collection.
|
java.lang.Object |
removeFirst()
Deprecated.
Removes the first element of this list, if any.
|
java.lang.Object |
removeLast()
Deprecated.
Removes the last element of this list, if any.
|
protected void |
removeListable(CursorableLinkedList.Listable elt)
Deprecated.
Removes the given
CursorableLinkedList.Listable from my list. |
boolean |
retainAll(java.util.Collection c)
Deprecated.
Retains only the elements in this list that are contained in the
specified collection.
|
java.lang.Object |
set(int index,
java.lang.Object element)
Deprecated.
Replaces the element at the specified position in this list with the
specified element.
|
int |
size()
Deprecated.
Returns the number of elements in this list.
|
java.util.List |
subList(int fromIndex,
int toIndex)
Deprecated.
Returns a fail-fast sublist.
|
java.lang.Object[] |
toArray()
Deprecated.
Returns an array containing all of the elements in this list in proper
sequence.
|
java.lang.Object[] |
toArray(java.lang.Object[] a)
Deprecated.
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.
|
broadcastListableChanged, broadcastListableInserted, broadcastListableRemoved, cursor, cursor, getListableAt, invalidateCursors, registerCursor, toString, unregisterCursorprotected CursorableLinkedList _list
protected CursorableLinkedList.Listable _pre
protected CursorableLinkedList.Listable _post
CursorableSubList(CursorableLinkedList list, int from, int to)
public void clear()
CursorableLinkedListclear in interface java.util.Collectionclear in interface java.util.Listclear in class CursorableLinkedListpublic java.util.Iterator iterator()
CursorableLinkedListiterator in interface java.lang.Iterableiterator in interface java.util.Collectioniterator in interface java.util.Listiterator in class CursorableLinkedListList.iterator()public int size()
CursorableLinkedListsize in interface java.util.Collectionsize in interface java.util.Listsize in class CursorableLinkedListpublic boolean isEmpty()
CursorableLinkedListisEmpty in interface java.util.CollectionisEmpty in interface java.util.ListisEmpty in class CursorableLinkedListpublic java.lang.Object[] toArray()
CursorableLinkedListCollection.toArray() method.toArray in interface java.util.CollectiontoArray in interface java.util.ListtoArray in class CursorableLinkedListpublic java.lang.Object[] toArray(java.lang.Object[] a)
CursorableLinkedListCollection.toArray() method.toArray in interface java.util.CollectiontoArray in interface java.util.ListtoArray in class CursorableLinkedLista - the array into which the elements of this list are to
be stored, if it is big enough; otherwise, a new array of the
same runtime type is allocated for this purpose.public boolean contains(java.lang.Object o)
CursorableLinkedListcontains in interface java.util.Collectioncontains in interface java.util.Listcontains in class CursorableLinkedListo - element whose presence in this list is to be tested.public boolean remove(java.lang.Object o)
CursorableLinkedListremove in interface java.util.Collectionremove in interface java.util.Listremove in class CursorableLinkedListo - element to be removed from this list, if present.public java.lang.Object removeFirst()
CursorableLinkedListremoveFirst in class CursorableLinkedListpublic java.lang.Object removeLast()
CursorableLinkedListremoveLast in class CursorableLinkedListpublic boolean addAll(java.util.Collection c)
CursorableLinkedListCollection's Iterator. The behavior of this operation is
unspecified if the specified collection is modified while
the operation is in progress. (Note that this will occur if the
specified collection is this list, and it's nonempty.)addAll in interface java.util.CollectionaddAll in interface java.util.ListaddAll in class CursorableLinkedListc - collection whose elements are to be added to this list.public boolean add(java.lang.Object o)
CursorableLinkedListadd in interface java.util.Collectionadd in interface java.util.Listadd in class CursorableLinkedListo - element to be appended to this list.public boolean addFirst(java.lang.Object o)
CursorableLinkedListadd(0,o)).addFirst in class CursorableLinkedListo - element to be prepended to this list.public boolean addLast(java.lang.Object o)
CursorableLinkedListCursorableLinkedList.add(java.lang.Object)).addLast in class CursorableLinkedListo - element to be appended to this list.public boolean removeAll(java.util.Collection c)
CursorableLinkedListremoveAll in interface java.util.CollectionremoveAll in interface java.util.ListremoveAll in class CursorableLinkedListc - collection that defines which elements will be removed from
this list.public boolean containsAll(java.util.Collection c)
CursorableLinkedListcontainsAll in interface java.util.CollectioncontainsAll in interface java.util.ListcontainsAll in class CursorableLinkedListc - collection to be checked for containment in this list.public boolean addAll(int index,
java.util.Collection c)
CursorableLinkedListCollection's Iterator. The behavior of this operation is
unspecified if the specified collection is modified while the
operation is in progress. (Note that this will occur if the specified
collection is this list, and it's nonempty.)addAll in interface java.util.ListaddAll in class CursorableLinkedListindex - index at which to insert first element from the specified
collection.c - elements to be inserted into this list.public int hashCode()
CursorableLinkedList
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.hashCode in interface java.util.CollectionhashCode in interface java.util.ListhashCode in class CursorableLinkedListObject.hashCode(),
Object.equals(Object),
CursorableLinkedList.equals(Object)public boolean retainAll(java.util.Collection c)
CursorableLinkedListretainAll in interface java.util.CollectionretainAll in interface java.util.ListretainAll in class CursorableLinkedListc - collection that defines which elements this set will retain.public java.lang.Object set(int index,
java.lang.Object element)
CursorableLinkedListset in interface java.util.Listset in class CursorableLinkedListindex - index of element to replace.element - element to be stored at the specified position.public boolean equals(java.lang.Object o)
CursorableLinkedListequals in interface java.util.Collectionequals in interface java.util.Listequals in class CursorableLinkedListo - the object to be compared for equality with this list.public java.lang.Object get(int index)
CursorableLinkedListget in interface java.util.Listget in class CursorableLinkedListindex - index of element to return.public java.lang.Object getFirst()
CursorableLinkedListgetFirst in class CursorableLinkedListpublic java.lang.Object getLast()
CursorableLinkedListgetLast in class CursorableLinkedListpublic void add(int index,
java.lang.Object element)
CursorableLinkedListadd in interface java.util.Listadd in class CursorableLinkedListindex - index at which the specified element is to be inserted.element - element to be inserted.public java.util.ListIterator listIterator(int index)
CursorableLinkedListlistIterator in interface java.util.ListlistIterator in class CursorableLinkedListList.listIterator(int)public java.lang.Object remove(int index)
CursorableLinkedListremove in interface java.util.Listremove in class CursorableLinkedListindex - the index of the element to removed.public int indexOf(java.lang.Object o)
CursorableLinkedListindexOf in interface java.util.ListindexOf in class CursorableLinkedListo - element to search for.public int lastIndexOf(java.lang.Object o)
CursorableLinkedListlastIndexOf in interface java.util.ListlastIndexOf in class CursorableLinkedListo - element to search for.public java.util.ListIterator listIterator()
CursorableLinkedListlistIterator in interface java.util.ListlistIterator in class CursorableLinkedListList.listIterator()public java.util.List subList(int fromIndex,
int toIndex)
CursorableLinkedListsubList in interface java.util.ListsubList in class CursorableLinkedListList.subList(int,int)protected CursorableLinkedList.Listable insertListable(CursorableLinkedList.Listable before, CursorableLinkedList.Listable after, java.lang.Object value)
insertListable in class CursorableLinkedListCursorableLinkedList.Listableprotected void removeListable(CursorableLinkedList.Listable elt)
CursorableLinkedList.Listable from my list.removeListable in class CursorableLinkedListprotected void checkForComod()
throws java.util.ConcurrentModificationException
ConcurrentModificationException, otherwise
quietly returns.java.util.ConcurrentModificationException