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 void
add(int index, T t)
boolean
add(T t)
boolean
addAll(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()
Iterator<T>
iterator()
T
set(int index, T t)
int
size()
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:
toArray
in interfaceCollection<T>
- Specified by:
toArray
in interfaceList<T>
- Overrides:
toArray
in classAbstractCollection<T>
-
toArray
public Object[] toArray()
- Specified by:
toArray
in interfaceCollection<T>
- Specified by:
toArray
in interfaceList<T>
- Overrides:
toArray
in 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:
addAll
in interfaceCollection<T>
- Specified by:
addAll
in interfaceList<T>
- Overrides:
addAll
in classAbstractCollection<T>
-
get
public T get(int index)
-
add
public boolean add(T t)
- Specified by:
add
in interfaceCollection<T>
- Specified by:
add
in interfaceList<T>
- Overrides:
add
in classAbstractList<T>
-
add
public void add(int index, T t)
-
size
public int size()
- Specified by:
size
in interfaceCollection<T>
- Specified by:
size
in interfaceList<T>
- Specified by:
size
in classAbstractCollection<T>
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmpty
in interfaceCollection<T>
- Specified by:
isEmpty
in interfaceList<T>
- Overrides:
isEmpty
in classAbstractCollection<T>
-
clear
public void clear()
- Specified by:
clear
in interfaceCollection<T>
- Specified by:
clear
in interfaceList<T>
- Overrides:
clear
in classAbstractList<T>
-
hashCode
public int hashCode()
- Specified by:
hashCode
in interfaceCollection<T>
- Specified by:
hashCode
in interfaceList<T>
- Overrides:
hashCode
in classAbstractList<T>
-
-