Package org.olap4j.metadata
Interface NamedList<E>
- All Superinterfaces:
Collection<E>
,Iterable<E>
,List<E>
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 aMap
whose key is the name of each element.Retrieves a member by name.Returns the name of a given element.int
indexOfName
(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, toArray
Methods inherited from interface java.util.List
add, add, addAll, addAll, clear, contains, containsAll, equals, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, replaceAll, retainAll, 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 aMap
whose key is the name of each element.- Returns:
- A view of this named list as a map
-