Package org.olap4j.impl
Class NamedListImpl<T extends Named>
java.lang.Object
java.util.AbstractCollection<T>
java.util.AbstractList<T>
java.util.ArrayList<T>
org.olap4j.impl.ArrayNamedListImpl<T>
org.olap4j.impl.NamedListImpl<T>
- All Implemented Interfaces:
Serializable
,Cloneable
,Iterable<T>
,Collection<T>
,List<T>
,RandomAccess
,SequencedCollection<T>
,NamedList<T>
Implementation of
NamedList
which uses
ArrayList
for storage and assumes that elements implement
the Named
interface.- Since:
- May 23, 2007
- Author:
- jhyde
- See Also:
-
Field Summary
Fields inherited from class java.util.AbstractList
modCount
-
Constructor Summary
ConstructorsConstructorDescriptionCreates an empty list.NamedListImpl
(int initialCapacity) Creates an empty list with the specified initial capacity.NamedListImpl
(Collection<? extends T> c) Creates a list containing the elements of the specified collection, in the order they are returned by the collection's iterator. -
Method Summary
Methods inherited from class org.olap4j.impl.ArrayNamedListImpl
asMap, get, indexOfName
Methods inherited from class java.util.ArrayList
add, add, addAll, addAll, addFirst, addLast, clear, clone, contains, ensureCapacity, equals, forEach, get, getFirst, getLast, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeFirst, removeIf, removeLast, removeRange, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray, trimToSize
Methods inherited from class java.util.AbstractCollection
containsAll, toString
Methods inherited from class java.lang.Object
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
add, add, addAll, addAll, addFirst, addLast, clear, contains, containsAll, equals, get, getFirst, getLast, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeFirst, removeLast, replaceAll, retainAll, reversed, set, size, sort, spliterator, subList, toArray, toArray
-
Constructor Details
-
NamedListImpl
public NamedListImpl(int initialCapacity) Creates an empty list with the specified initial capacity.- Parameters:
initialCapacity
- the initial capacity of the list- Throws:
IllegalArgumentException
- if the specified initial capacity is negative
-
NamedListImpl
public NamedListImpl()Creates an empty list. -
NamedListImpl
Creates a list containing the elements of the specified collection, in the order they are returned by the collection's iterator.- Parameters:
c
- the collection whose elements are to be placed into this list- Throws:
NullPointerException
- if the specified collection is null
-
-
Method Details
-
getName
Description copied from interface:NamedList
Returns the name of a given element.- Parameters:
t
- Element- Returns:
- Name of element
-