Package org.olap4j.impl
Class AbstractNamedList<T>
java.lang.Object
java.util.AbstractCollection<T>
java.util.AbstractList<T>
org.olap4j.impl.AbstractNamedList<T>
- All Implemented Interfaces:
Iterable<T>,Collection<T>,List<T>,SequencedCollection<T>,NamedList<T>
Partial implementation of
NamedList.
Derived class must implement AbstractList.get(int) and AbstractCollection.size(), as
per AbstractList; and must implement
NamedList.getName(Object), to indicate how elements are named.
- Since:
- May 25, 2007
- Author:
- jhyde
- See Also:
-
Field Summary
Fields inherited from class java.util.AbstractList
modCount -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionasMap()Returns a view of this named list as aMapwhose key is the name of each element.Retrieves a member by name.intindexOfName(String name) Returns the position where a member of a given name is found, or -1 if the member is not present.Methods inherited from class java.util.AbstractList
add, add, addAll, clear, equals, get, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, remove, removeRange, set, subListMethods inherited from class java.util.AbstractCollection
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, size, toArray, toArray, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArrayMethods 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
-
AbstractNamedList
public AbstractNamedList()
-
-
Method Details
-
get
Description copied from interface:NamedListRetrieves a member by name. -
indexOfName
Description copied from interface:NamedListReturns the position where a member of a given name is found, or -1 if the member is not present.- Specified by:
indexOfNamein interfaceNamedList<T>- Parameters:
name- name of the element to return- Returns:
- the index of element of the list with the specified name, or -1 if there is no such element
- See Also:
-
asMap
Description copied from interface:NamedListReturns a view of this named list as aMapwhose key is the name of each element.
-