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:
- Iterable<T>, Collection<T>, List<T>, 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.
Unlike ArrayList or
Arrays.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
| 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 |
Util.Flat2List
Util.Flat2List(T t0,
T t1)
toString
public String toString()
- Overrides:
toString in class Object
get
public T get(int index)
size
public int size()
equals
public boolean equals(Object o)
- Specified by:
equals in interface Collection<T>- Specified by:
equals in interface List<T>- Overrides:
equals in class Object
hashCode
public int hashCode()
- Specified by:
hashCode in interface Collection<T>- Specified by:
hashCode in interface List<T>- Overrides:
hashCode in class Object
indexOf
public int indexOf(Object o)
lastIndexOf
public int lastIndexOf(Object o)
toArray
public <T2> T2[] toArray(T2[] a)
toArray
public Object[] toArray()