Package mondrian.olap

Class Util.Flat3List<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.Flat3List<T>
    extends Util.AbstractFlatList<T>
    List that stores its three elements in the three 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 none of the elements can be null.

    The list is created via Util.flatList(Object[]).

    See Also:
    Util.Flat2List
    • Constructor Detail

      • Flat3List

        Flat3List​(T t0,
                  T t1,
                  T t2)
    • Method Detail

      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • get

        public T get​(int index)
      • size

        public int size()
      • equals

        public boolean equals​(java.lang.Object o)
        Specified by:
        equals in interface java.util.Collection<T>
        Specified by:
        equals in interface java.util.List<T>
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Specified by:
        hashCode in interface java.util.Collection<T>
        Specified by:
        hashCode in interface java.util.List<T>
        Overrides:
        hashCode in class java.lang.Object
      • 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()