|
Build 1.0_r1(from source) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.concurrent.CopyOnWriteArrayList.SubList
static class CopyOnWriteArrayList.SubList
Represents a list returned by sublist().
| Constructor Summary | |
|---|---|
CopyOnWriteArrayList.SubList(CopyOnWriteArrayList list,
int fromIdx,
int toIdx)
Sublist constructor. |
|
| Method Summary | |
|---|---|
void |
add(int index,
Object object)
Inserts the specified object into this Vector at the specified location. |
boolean |
add(Object o)
Adds the specified object at the end of this List. |
boolean |
addAll(Collection c)
Adds the objects in the specified Collection to the end of this List. |
boolean |
addAll(int index,
Collection collection)
Inserts the objects in the specified Collection at the specified location in this List. |
void |
clear()
Removes all elements from this List, leaving it empty. |
boolean |
contains(Object o)
Searches this List for the specified object. |
boolean |
containsAll(Collection c)
Searches this List for all objects in the specified Collection. |
Object |
get(int index)
Returns the element at the specified location in this List. |
int |
indexOf(Object o)
Searches this List for the specified object and returns the index of the first occurrence. |
boolean |
isEmpty()
Returns if this List has no elements, a size of zero. |
Iterator |
iterator()
Returns an Iterator on the elements of this List. |
int |
lastIndexOf(Object o)
Searches this List for the specified object and returns the index of the last occurrence. |
ListIterator |
listIterator()
Returns a ListIterator on the elements of this List. |
ListIterator |
listIterator(int startIdx)
Returns a ListIterator on the elements of this List. |
Object |
remove(int index)
Removes the object at the specified location from this List. |
boolean |
remove(Object o)
Removes the first occurrence of the specified object from this List. |
boolean |
removeAll(Collection c)
Removes all occurrences in this List of each object in the specified Collection. |
boolean |
retainAll(Collection c)
Removes all objects from this List that are not contained in the specified Collection. |
Object |
set(int index,
Object obj)
Replaces the element at the specified location in this List with the specified object. |
int |
size()
Returns the number of elements in this List. |
List |
subList(int fromIndex,
int toIndex)
Returns a List of the specified portion of this List from the start index to one less than the end index. |
Object[] |
toArray()
Returns an array containing all elements contained in this List. |
Object[] |
toArray(Object[] a)
Returns an array containing all elements contained in this List. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface java.util.List |
|---|
equals, hashCode |
| Constructor Detail |
|---|
public CopyOnWriteArrayList.SubList(CopyOnWriteArrayList list,
int fromIdx,
int toIdx)
list - backing list.fromIdx - startingIndex, inclusivetoIdx - endIndex, exclusive| Method Detail |
|---|
public ListIterator listIterator(int startIdx)
List
listIterator in interface ListstartIdx - the index at which to start the iteration
List.listIterator(int)
public Object set(int index,
Object obj)
List
set in interface Listindex - the index at which to put the specified objectobj - the object to add
List.set(int, java.lang.Object)public Object get(int index)
List
get in interface Listindex - the index of the element to return
List.get(int)public int size()
List
size in interface Collectionsize in interface ListCollection.size()public Object remove(int index)
List
remove in interface Listindex - the index of the object to remove
List.remove(int)
public void add(int index,
Object object)
List
add in interface Listindex - the index at which to insertobject - the object to addList.add(int, java.lang.Object)public boolean add(Object o)
List
add in interface Collectionadd in interface Listo - the object to add
public boolean addAll(Collection c)
List
addAll in interface CollectionaddAll in interface Listc - the Collection of objects
public void clear()
List
clear in interface Collectionclear in interface ListList.isEmpty(),
List.size()public boolean contains(Object o)
List
contains in interface Collectioncontains in interface Listo - the object to search for
public boolean containsAll(Collection c)
List
containsAll in interface CollectioncontainsAll in interface Listc - the Collection of objects
public int indexOf(Object o)
List
indexOf in interface Listo - the object to search for
public boolean isEmpty()
List
isEmpty in interface CollectionisEmpty in interface ListList.size()public Iterator iterator()
List
iterator in interface Iterableiterator in interface Collectioniterator in interface ListIteratorpublic int lastIndexOf(Object o)
List
lastIndexOf in interface Listo - the object to search for
public ListIterator listIterator()
List
listIterator in interface ListListIteratorpublic boolean remove(Object o)
List
remove in interface Collectionremove in interface Listo - the object to remove
public boolean removeAll(Collection c)
List
removeAll in interface CollectionremoveAll in interface Listc - the Collection of objects to remove
public boolean retainAll(Collection c)
List
retainAll in interface CollectionretainAll in interface Listc - the Collection of objects to retain
public List subList(int fromIndex,
int toIndex)
List
subList in interface ListfromIndex - the index at which to start the sublisttoIndex - the index one past the end of the sublist
public Object[] toArray()
List
toArray in interface CollectiontoArray in interface Listpublic Object[] toArray(Object[] a)
List
toArray in interface CollectiontoArray in interface Lista - the array
public boolean addAll(int index,
Collection collection)
List
addAll in interface Listindex - the index at which to insertcollection - the Collection of objects
List.addAll(int, java.util.Collection)
|
Build 1.0_r1(from source) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||