Package org.olap4j.metadata
Interface NamedList<E>
- All Superinterfaces:
Collection<E>,Iterable<E>,List<E>,SequencedCollection<E>
- All Known Implementing Classes:
AbstractNamedList,ArrayNamedListImpl,NamedListImpl
Extension to
List which allows access to members of the
list by name as well as by ordinal.- Since:
- Aug 22, 2006
- Author:
- jhyde
-
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.Returns the name of a given element.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 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
-
Method Details
-
get
Retrieves a member by name.- Parameters:
name- name of the element to return- Returns:
- the element of the list with the specified name, or null if there is no such element
- See Also:
-
indexOfName
Returns the position where a member of a given name is found, or -1 if the member is not present.- 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:
-
getName
Returns the name of a given element.- Parameters:
element- Element- Returns:
- Name of element
-
asMap
Returns a view of this named list as aMapwhose key is the name of each element.- Returns:
- A view of this named list as a map
-