|
Oracle® Coherence Java API Reference Release 3.7.1.0 E22843-01 |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
com.tangosol.util.WrapperCollections.AbstractWrapperCollection
com.tangosol.util.WrapperCollections.AbstractWrapperList
public abstract static class WrapperCollections.AbstractWrapperList
List implementation which delegates all calls to another List.
Constructor Summary | |
---|---|
protected |
WrapperCollections.AbstractWrapperList(java.util.List list) Create an AbstractWrapperList which delegates to the specified List. |
Method Summary | |
---|---|
void |
add(int index, java.lang.Object element) Inserts the specified element at the specified position in this list (optional operation). |
boolean |
addAll(int index, java.util.Collection c) Inserts all of the elements in the specified collection into this list at the specified position (optional operation). |
java.lang.Object |
get(int index) Returns the element at the specified position in this list. |
protected java.util.List |
getDelegate() Return the List to which all operations should be delegated to. |
int |
indexOf(java.lang.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. |
int |
lastIndexOf(java.lang.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. |
java.util.ListIterator |
listIterator() Returns a list iterator of the elements in this list (in proper sequence). |
java.util.ListIterator |
listIterator(int index) Returns a list iterator of the elements in this list (in proper sequence), starting at the specified position in this list. |
java.lang.Object |
remove(int index) Removes the element at the specified position in this list (optional operation). |
java.lang.Object |
set(int index, java.lang.Object element) Replaces the element at the specified position in this list with the specified element (optional operation). |
java.util.List |
subList(int fromIndex, int toIndex) Returns a view of the portion of this list between the specified fromIndex, inclusive, and toIndex, exclusive. |
Methods inherited from class com.tangosol.util.WrapperCollections.AbstractWrapperCollection |
---|
add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray, toString |
Methods inherited from interface java.util.List |
---|
add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray |
Constructor Detail |
---|
protected WrapperCollections.AbstractWrapperList(java.util.List list)
list
- the List to delegate all calls toMethod Detail |
---|
protected java.util.List getDelegate()
getDelegate
in class WrapperCollections.AbstractWrapperCollection
public boolean addAll(int index, java.util.Collection c)
addAll
in interface java.util.List
index
- index at which to insert first element from the specified collection.c
- elements to be inserted into this list.public java.lang.Object get(int index)
get
in interface java.util.List
index
- index of element to return.public java.lang.Object set(int index, java.lang.Object element)
set
in interface java.util.List
index
- index of element to replace.element
- element to be stored at the specified position.public void add(int index, java.lang.Object element)
add
in interface java.util.List
index
- index at which the specified element is to be inserted.element
- element to be inserted.public java.lang.Object remove(int index)
remove
in interface java.util.List
index
- the index of the element to removed.public int indexOf(java.lang.Object o)
indexOf
in interface java.util.List
o
- element to search for.public int lastIndexOf(java.lang.Object o)
lastIndexOf
in interface java.util.List
o
- element to search for.public java.util.ListIterator listIterator()
listIterator
in interface java.util.List
public java.util.ListIterator listIterator(int index)
listIterator
in interface java.util.List
index
- index of first element to be returned from the list iterator (by a call to the next method).public java.util.List subList(int fromIndex, int toIndex)
This method eliminates the need for explicit range operations (of the sort that commonly exist for arrays). Any operation that expects a list can be used as a range operation by passing a subList view instead of a whole list. For example, the following idiom removes a range of elements from a list:
list.subList(from, to).clear();Similar idioms may be constructed for indexOf and lastIndexOf, and all of the algorithms in the Collections class can be applied to a subList.
The semantics of the list returned by this method become undefined if the backing list (i.e., this list) is structurally modified in any way other than via the returned list. (Structural modifications are those that change the size of this list, or otherwise perturb it in such a fashion that iterations in progress may yield incorrect results.)
subList
in interface java.util.List
fromIndex
- low endpoint (inclusive) of the subList.toIndex
- high endpoint (exclusive) of the subList.
|
Oracle® Coherence Java API Reference Release 3.7.1.0 E22843-01 |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |