|
Oracle® Coherence Java API Reference v3.5 E14977-01 |
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Object
java.util.AbstractCollection
java.util.AbstractList
com.tangosol.util.ImmutableMultiList
public class ImmutableMultiList
Implementation of the List interface in a read-only fashion based on a collection of arrays. <p/> This class also implements the Set interface, although the contents are not checked to determine whether each element is unique. It is the responsibility of the user to ensure that the elements are unique if the object is used as a Set.
ImmutableArrayList| Field Summary |
|---|
| Fields inherited from class java.util.AbstractList |
|---|
modCount |
| Constructor Summary | |
|---|---|
ImmutableMultiList(java.util.Collection collection)Construct a List containing the elements of the specified Collection of Object arrays. |
|
ImmutableMultiList(java.lang.Object[][] aao)Construct a List containing the elements of the specified array of Object arrays. |
|
| Method Summary | |
|---|---|
static int |
calculateTotalLength(java.lang.Object[][] aao)Calculate the total number of element in the array of arrays. |
boolean |
contains(java.lang.Object o)Returns true if this List contains the specified element. |
protected ImmutableArrayList |
ensureFlattened()Flatten the multi array into a single array. |
boolean |
equals(java.lang.Object o)Compare this Collection / List / Set with some other Object and determine if the caller would believe this Object to equal that other Object. |
static java.lang.Object[] |
flatten(java.lang.Object[][] aaoFrom, int cTotal, java.lang.Object[] aoTo)Create a single dimensional array containing all elements of the specified array of arrays. |
java.lang.Object |
get(int i)Returns the element at the specified position in 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. |
java.util.Iterator |
iterator()Returns an iterator over the elements in this list in proper sequence. |
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. |
int |
size()Returns the number of elements in this List. |
java.lang.Object[] |
toArray()Returns an array containing all of the elements in this List in the order that the elements occur in the List. |
java.lang.Object[] |
toArray(java.lang.Object[] ao)Returns an array with ao runtime type is that of the specified array and that contains all of the elements in this List. |
| Methods inherited from class java.util.AbstractList |
|---|
add, add, addAll, clear, hashCode, listIterator, listIterator, remove, removeRange, set, subList |
| Methods inherited from class java.util.AbstractCollection |
|---|
addAll, containsAll, isEmpty, remove, removeAll, retainAll, toString |
| Methods inherited from interface java.util.List |
|---|
add, add, addAll, addAll, clear, containsAll, hashCode, isEmpty, listIterator, listIterator, remove, remove, removeAll, retainAll, set, subList |
| Methods inherited from interface java.util.Set |
|---|
add, addAll, clear, containsAll, hashCode, isEmpty, remove, removeAll, retainAll |
| Constructor Detail |
|---|
public ImmutableMultiList(java.lang.Object[][] aao)
aao - the array of arrays to fill this MultiList frompublic ImmutableMultiList(java.util.Collection collection)
collection - the Collection of arrays to fill this MultiList from| Method Detail |
|---|
public int size()
size in interface java.util.Collectionsize in interface java.util.Listsize in interface java.util.Setsize in class java.util.AbstractCollectionpublic java.lang.Object get(int i)
get in interface java.util.Listget in class java.util.AbstractListi - the index of the element to returnjava.lang.IndexOutOfBoundsException - if the index is out of range (index < 0 || index >= size()).public int indexOf(java.lang.Object o)
indexOf in interface java.util.ListindexOf in class java.util.AbstractListo - element to search for.public int lastIndexOf(java.lang.Object o)
lastIndexOf in interface java.util.ListlastIndexOf in class java.util.AbstractListo - element to search for.public boolean contains(java.lang.Object o)
contains in interface java.util.Collectioncontains in interface java.util.Listcontains in interface java.util.Setcontains in class java.util.AbstractCollectiono - element whose presence in this List is to be testedpublic java.lang.Object[] toArray()
toArray in interface java.util.CollectiontoArray in interface java.util.ListtoArray in interface java.util.SettoArray in class java.util.AbstractCollectionpublic java.lang.Object[] toArray(java.lang.Object[] ao)
toArray in interface java.util.CollectiontoArray in interface java.util.ListtoArray in interface java.util.SettoArray in class java.util.AbstractCollectionao - the array into which the elements of the MultiList are to be stored, if it is big enough; otherwise, ao new array of the same runtime type is allocated for this purposejava.lang.ArrayStoreException - if the runtime type of the specified array is not ao supertype of the runtime type of every element in this MultiListpublic java.util.Iterator iterator()
iterator in interface java.lang.Iterableiterator in interface java.util.Collectioniterator in interface java.util.Listiterator in interface java.util.Setiterator in class java.util.AbstractListpublic boolean equals(java.lang.Object o)
equals in interface java.util.Collectionequals in interface java.util.Listequals in interface java.util.Setequals in class java.util.AbstractListo - some other Object that is likely to be a Collection or some more specific type (with its related overloaded definition of what it thinks that equals() means)protected ImmutableArrayList ensureFlattened()
public static int calculateTotalLength(java.lang.Object[][] aao)
aao - an array of arrays
public static java.lang.Object[] flatten(java.lang.Object[][] aaoFrom,
int cTotal,
java.lang.Object[] aoTo)
aaoFrom - an array of arrays to copy fromcTotal - the total length of the flattened array; pass -1 for it to be calculatedaoTo - an array to copy the elements into (optional)java.lang.ArrayIndexOutOfBoundsException - if the total length parameter was not sufficient to hold the flattened array
|
Oracle® Coherence Java API Reference v3.5 E14977-01 |
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||