Package mondrian.util
Class ConcatenableList<T>
- java.lang.Object
-
- java.util.AbstractCollection<E>
-
- java.util.AbstractList<T>
-
- mondrian.util.ConcatenableList<T>
-
- All Implemented Interfaces:
Iterable<T>,Collection<T>,List<T>
public class ConcatenableList<T> extends 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 voidadd(int index, T t)booleanadd(T t)booleanaddAll(Collection<? extends T> collection)voidclear()voidconsolidate()Performs a load of all elements into memory, removing sequential access advantages.Tget(int index)inthashCode()booleanisEmpty()Iterator<T>iterator()Tset(int index, T t)intsize()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.util.List
contains, containsAll, remove, removeAll, replaceAll, retainAll, sort, spliterator
-
-
-
-
Method Detail
-
toArray
public <T2> T2[] toArray(T2[] a)
- Specified by:
toArrayin interfaceCollection<T>- Specified by:
toArrayin interfaceList<T>- Overrides:
toArrayin classAbstractCollection<T>
-
toArray
public Object[] toArray()
- Specified by:
toArrayin interfaceCollection<T>- Specified by:
toArrayin interfaceList<T>- Overrides:
toArrayin classAbstractCollection<T>
-
consolidate
public void consolidate()
Performs a load of all elements into memory, removing sequential access advantages.
-
addAll
public boolean addAll(Collection<? extends T> collection)
- Specified by:
addAllin interfaceCollection<T>- Specified by:
addAllin interfaceList<T>- Overrides:
addAllin classAbstractCollection<T>
-
get
public T get(int index)
-
add
public boolean add(T t)
- Specified by:
addin interfaceCollection<T>- Specified by:
addin interfaceList<T>- Overrides:
addin classAbstractList<T>
-
add
public void add(int index, T t)
-
size
public int size()
- Specified by:
sizein interfaceCollection<T>- Specified by:
sizein interfaceList<T>- Specified by:
sizein classAbstractCollection<T>
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmptyin interfaceCollection<T>- Specified by:
isEmptyin interfaceList<T>- Overrides:
isEmptyin classAbstractCollection<T>
-
clear
public void clear()
- Specified by:
clearin interfaceCollection<T>- Specified by:
clearin interfaceList<T>- Overrides:
clearin classAbstractList<T>
-
hashCode
public int hashCode()
- Specified by:
hashCodein interfaceCollection<T>- Specified by:
hashCodein interfaceList<T>- Overrides:
hashCodein classAbstractList<T>
-
-