Package de.espirit.or
Interface EntityList
A list containing
Entity
instances. This list also offers the option to get the KeyValue
of an
element at a specific index.- Since:
- 4.0.17
-
Method Summary
Modifier and TypeMethodDescriptiongetKeyValue
(int index) Returns theKeyValue
of the element at the specified position in this list.int
Return the index of the entity in the list with the givenid
or-1
if there is no such entity in the list.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
-
indexOfId
Return the index of the entity in the list with the givenid
or-1
if there is no such entity in the list. This method is faster then iterating through the elements of the list.- Parameters:
id
- the key value to look for.- Returns:
- -1 or the index of the entity with the given
id
. - Since:
- 4.0.17
-
getKeyValue
Returns theKeyValue
of the element at the specified position in this list.- Parameters:
index
- index of the element to return- Returns:
KeyValue
of the the element at the specified position in this list- Throws:
IndexOutOfBoundsException
- if the index is out of range (index < 0 || index >=
)List.size()
- Since:
- 4.0.17
-