Package mondrian.util

Class ConcatenableList<T>

  • All Implemented Interfaces:
    java.lang.Iterable<T>, java.util.Collection<T>, java.util.List<T>

    public class ConcatenableList<T>
    extends java.util.AbstractList<T>
    List backed by a collection of sub-lists.
    Since:
    december, 2007
    Author:
    Luis F. Canals
    • Field Summary

      • Fields inherited from class java.util.AbstractList

        modCount
    • Constructor Summary

      Constructors 
      Constructor Description
      ConcatenableList()
      Creates an empty ConcatenableList.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void add​(int index, T t)  
      boolean add​(T t)  
      boolean addAll​(java.util.Collection<? extends T> collection)  
      void clear()  
      void consolidate()
      Performs a load of all elements into memory, removing sequential access advantages.
      T get​(int index)  
      int hashCode()  
      boolean isEmpty()  
      java.util.Iterator<T> iterator()  
      T set​(int index, T t)  
      int size()  
      java.lang.Object[] toArray()  
      <T2> T2[] toArray​(T2[] a)  
      • Methods inherited from class java.util.AbstractList

        addAll, equals, indexOf, lastIndexOf, listIterator, listIterator, remove, removeRange, subList
      • Methods inherited from class java.util.AbstractCollection

        contains, containsAll, remove, removeAll, retainAll, toString
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface java.util.Collection

        parallelStream, removeIf, stream, toArray
      • Methods inherited from interface java.lang.Iterable

        forEach
      • Methods inherited from interface java.util.List

        contains, containsAll, remove, removeAll, replaceAll, retainAll, sort, spliterator
    • Constructor Detail

      • ConcatenableList

        public ConcatenableList()
        Creates an empty ConcatenableList.
    • Method Detail

      • toArray

        public <T2> T2[] toArray​(T2[] a)
        Specified by:
        toArray in interface java.util.Collection<T>
        Specified by:
        toArray in interface java.util.List<T>
        Overrides:
        toArray in class java.util.AbstractCollection<T>
      • toArray

        public java.lang.Object[] toArray()
        Specified by:
        toArray in interface java.util.Collection<T>
        Specified by:
        toArray in interface java.util.List<T>
        Overrides:
        toArray in class java.util.AbstractCollection<T>
      • consolidate

        public void consolidate()
        Performs a load of all elements into memory, removing sequential access advantages.
      • addAll

        public boolean addAll​(java.util.Collection<? extends T> collection)
        Specified by:
        addAll in interface java.util.Collection<T>
        Specified by:
        addAll in interface java.util.List<T>
        Overrides:
        addAll in class java.util.AbstractCollection<T>
      • get

        public T get​(int index)
        Specified by:
        get in interface java.util.List<T>
        Specified by:
        get in class java.util.AbstractList<T>
      • add

        public boolean add​(T t)
        Specified by:
        add in interface java.util.Collection<T>
        Specified by:
        add in interface java.util.List<T>
        Overrides:
        add in class java.util.AbstractList<T>
      • add

        public void add​(int index,
                        T t)
        Specified by:
        add in interface java.util.List<T>
        Overrides:
        add in class java.util.AbstractList<T>
      • set

        public T set​(int index,
                     T t)
        Specified by:
        set in interface java.util.List<T>
        Overrides:
        set in class java.util.AbstractList<T>
      • size

        public int size()
        Specified by:
        size in interface java.util.Collection<T>
        Specified by:
        size in interface java.util.List<T>
        Specified by:
        size in class java.util.AbstractCollection<T>
      • iterator

        public java.util.Iterator<T> iterator()
        Specified by:
        iterator in interface java.util.Collection<T>
        Specified by:
        iterator in interface java.lang.Iterable<T>
        Specified by:
        iterator in interface java.util.List<T>
        Overrides:
        iterator in class java.util.AbstractList<T>
      • isEmpty

        public boolean isEmpty()
        Specified by:
        isEmpty in interface java.util.Collection<T>
        Specified by:
        isEmpty in interface java.util.List<T>
        Overrides:
        isEmpty in class java.util.AbstractCollection<T>
      • clear

        public void clear()
        Specified by:
        clear in interface java.util.Collection<T>
        Specified by:
        clear in interface java.util.List<T>
        Overrides:
        clear in class java.util.AbstractList<T>
      • 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.util.AbstractList<T>