|
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.Base
com.tangosol.util.ConverterCollections.ConverterCollection
com.tangosol.util.ConverterCollections.ConverterList
public static class ConverterCollections.ConverterList
A Converter List views an underlying List through a Converter.
Field Summary |
---|
Fields inherited from class com.tangosol.util.ConverterCollections.ConverterCollection |
---|
m_col, m_convDown, m_convUp |
Constructor Summary | |
---|---|
ConverterCollections.ConverterList(java.util.List list, Converter convUp, Converter convDown) Constructor. |
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 col) Inserts all of the elements in the specified collection into this list at the specified position (optional operation). |
boolean |
equals(java.lang.Object o) Compares the specified object with this collection for equality. |
java.lang.Object |
get(int index) Returns the element at the specified position in this list. |
java.util.List |
getList() Return the underlying List. |
int |
hashCode() Returns the hash code value for this list. |
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. |
protected java.util.List |
instantiateList(java.util.List list, Converter convUp, Converter convDown) Create a Converter List. |
protected java.util.ListIterator |
instantiateListIterator(java.util.ListIterator iter, Converter convUp, Converter convDown) Create a Converter ListIterator. |
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.ConverterCollections.ConverterCollection |
---|
add, addAll, clear, contains, containsAll, getCollection, getConverterDown, getConverterUp, instantiateCollection, instantiateIterator, invalidate, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray, toString |
Methods inherited from interface java.util.List |
---|
add, addAll, clear, contains, containsAll, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray |
Constructor Detail |
---|
public ConverterCollections.ConverterList(java.util.List list, Converter convUp, Converter convDown)
list
- the underlying ListconvUp
- the Converter from the underlying ListconvDown
- the Converter to the underlying ListMethod Detail |
---|
public java.lang.Object get(int index)
get
in interface java.util.List
index
- index of element to returnpublic 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 insertedelement
- element to be insertedpublic boolean addAll(int index, java.util.Collection col)
addAll
in interface java.util.List
index
- index at which to insert first element from the specified collectioncol
- elements to be inserted into this listpublic java.lang.Object remove(int index)
remove
in interface java.util.List
index
- the index of the element to removedpublic int indexOf(java.lang.Object o)
indexOf
in interface java.util.List
o
- element to search forpublic int lastIndexOf(java.lang.Object o)
lastIndexOf
in interface java.util.List
o
- element to search forpublic 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)
subList
in interface java.util.List
fromIndex
- low endpoint (inclusive) of the subListtoIndex
- high endpoint (exclusive) of the subListpublic boolean equals(java.lang.Object o)
Obeys the general contract of Collection.equals.
equals
in interface java.util.Collection
equals
in interface java.util.List
equals
in class ConverterCollections.ConverterCollection
o
- Object to be compared for equality with this CollectionObject.equals(Object)
, Set.equals(Object)
, List.equals(Object)
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.
hashCode
in interface java.util.Collection
hashCode
in interface java.util.List
Object.hashCode()
, Object.equals(Object)
, List.equals(Object)
protected java.util.List instantiateList(java.util.List list, Converter convUp, Converter convDown)
list
- the underlying ListconvUp
- the Converter to view the underlying List throughconvDown
- the Converter to pass items down to the underlying List throughprotected java.util.ListIterator instantiateListIterator(java.util.ListIterator iter, Converter convUp, Converter convDown)
iter
- the underlying ListIteratorconvUp
- the Converter to view the underlying ListIterator throughconvDown
- the Converter to pass items down to the underlying ListIterator throughpublic java.util.List getList()
|
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 |