public interface NamedList<E> extends List<E>
List
which allows access to members of the
list by name as well as by ordinal.Modifier and Type | Method and Description |
---|---|
Map<String,E> |
asMap()
Returns a view of this named list as a
Map whose key is the name
of each element. |
E |
get(String name)
Retrieves a member by name.
|
String |
getName(Object element)
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.
|
E get(String name)
name
- name of the element to returnList.get(int)
int indexOfName(String name)
name
- name of the element to returnList.indexOf(Object)
String getName(Object element)
element
- Element