Package mondrian.olap
Class Util.Flat2List<T>
- java.lang.Object
-
- mondrian.olap.Util.AbstractFlatList<T>
-
- mondrian.olap.Util.Flat2List<T>
-
- Type Parameters:
T
-
- All Implemented Interfaces:
java.lang.Iterable<T>
,java.util.Collection<T>
,java.util.List<T>
,java.util.RandomAccess
- Enclosing class:
- Util
protected static class Util.Flat2List<T> extends Util.AbstractFlatList<T>
List that stores its two elements in the two members of the class. UnlikeArrayList
orArrays.asList(Object[])
there is no array, only one piece of memory allocated, therefore is very compact and cache and CPU efficient.The list is read-only, cannot be modified or resized, and neither of the elements can be null.
The list is created via
Util.flatList(Object[])
.- See Also:
Util.Flat3List
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object o)
T
get(int index)
int
hashCode()
int
indexOf(java.lang.Object o)
int
lastIndexOf(java.lang.Object o)
int
size()
java.lang.Object[]
toArray()
<T2> T2[]
toArray(T2[] a)
java.lang.String
toString()
-
Methods inherited from class mondrian.olap.Util.AbstractFlatList
add, add, addAll, addAll, asArrayList, clear, contains, containsAll, isEmpty, iterator, listIterator, listIterator, remove, remove, removeAll, retainAll, set, subList
-
-
-
-
Method Detail
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
get
public T get(int index)
-
size
public int size()
-
equals
public boolean equals(java.lang.Object o)
-
hashCode
public int hashCode()
-
indexOf
public int indexOf(java.lang.Object o)
-
lastIndexOf
public int lastIndexOf(java.lang.Object o)
-
toArray
public <T2> T2[] toArray(T2[] a)
-
toArray
public java.lang.Object[] toArray()
-
-