Schnittstelle SingleSearchable<E>
- Typparameter:
E- is the type of the elements aSingleSearchable.
- Alle bekannten Unterschnittstellen:
IArrayList<E>,ICachingContainer<E>,IContainer<E>,ILinkedList<E>,IMatrix<E>,ISqlRecord
- Alle bekannten Implementierungsklassen:
AbstractContainer,AbstractExtendedContainer,ArrayContainerView,ArrayList,CachingContainer,ContainerView,FilterContainerView,ImmutableList,IntervallContainerView,IterableContainerView,LinkedList,MappingContainerView,Matrix,MatrixColumn,MatrixRow,MultiContainerView,SqlRecord
public interface SingleSearchable<E>
- Version:
- 2024-11-12
- Autor:
- Silvan Wyss
-
Methodenübersicht
Modifizierer und TypMethodeBeschreibunggetOptionalStoredFirst(Predicate<? super E> selector) getStoredAtOneBasedIndex(int oneBasedIndex) <C extends Comparable<C>>
EgetStoredByMax(Function<E, C> comparableMapper) <C extends Comparable<C>>
EgetStoredByMin(Function<E, C> comparableMapper) getStoredFirst(Predicate<? super E> selector) <E2 extends E>
E2getStoredFirstOfType(Class<E2> type) getStoredOne(Predicate<? super E> selector)
-
Methodendetails
-
getOptionalStoredFirst
- Gibt zurück:
- a
Optionalwith the first element of the currentSingleSearchableif the currentSingleSearchableis not empty and if the first element of the currentSingleSearchableis not null, an emptyOptionalotherwise.
-
getOptionalStoredFirst
- Parameter:
selector-- Gibt zurück:
- a new
Optionalwith the first element the given selector selects from the currentSingleSearchableif the currentSingleSearchablecontains an element the given selector selects, an emptyOptionalotherwise. Ignores null elements. - Löst aus:
RuntimeException- if the given selector is null.
-
getStoredAtOneBasedIndex
- Parameter:
oneBasedIndex-- Gibt zurück:
- the element at the given oneBasedIndex. The element can be null.
- Löst aus:
RuntimeException- if the currentSingleSearchabledoes not contain an element at the given oneBasedIndex.
-
getStoredByMax
- Typparameter:
C- is the type of theComparables the given comparableMapper maps from the elements of the currentSingleSearchable.- Parameter:
comparableMapper-- Gibt zurück:
- the element with the biggest
Comparablethe given comparableMapper maps from the elements of the currentSingleSearchable. Ignores null elements. - Löst aus:
RuntimeException- if the given comparableMapper is null.RuntimeException- if the currentSingleSearchabledoes not contain a non-null element.
-
getStoredByMin
- Typparameter:
C- is the type of theComparables the given comparableMapper maps from the elements of the currentSingleSearchable.- Parameter:
comparableMapper-- Gibt zurück:
- the element with the smallest
Comparablethe given comparableMapper maps from the elements of the currentSingleSearchable. Ignores null elements. - Löst aus:
RuntimeException- if the given comparableMapper is null.RuntimeException- if the currentSingleSearchabledoes not contain a non-null element.
-
getStoredFirst
E getStoredFirst()- Gibt zurück:
- the first element of the current
SingleSearchable. The element can be null. - Löst aus:
RuntimeException- if the currentSingleSearchableis empty.
-
getStoredFirst
- Parameter:
selector-- Gibt zurück:
- the first element the given selector selects from the current
SingleSearchable. Ignores null elements. - Löst aus:
RuntimeException- if the currentSingleSearchabledoes not contain an element the given selector selects.
-
getStoredFirstOfType
- Typparameter:
E2- is the given type.- Parameter:
type-- Gibt zurück:
- the first element from the current
SingleSearchablethat is of the given type. - Löst aus:
RuntimeException- if the given type is null.RuntimeException- if the currentSingleSearchabledoes not contain an element of the given type.
-
getStoredLast
E getStoredLast()- Gibt zurück:
- the last element of the current
SingleSearchable. The element can be null. - Löst aus:
RuntimeException- if the currentSingleSearchableis empty.
-
getStoredOne
E getStoredOne()- Gibt zurück:
- the one element of the current
SingleSearchable. The element can be null. - Löst aus:
RuntimeException- if the currentSingleSearchableis empty.RuntimeException- if the currentSingleSearchablecontains several elements.
-
getStoredOne
- Parameter:
selector-- Gibt zurück:
- the one element the given selector selects from the current
SingleSearchable. Ignores null elements. - Löst aus:
RuntimeException- if the given selector is null.RuntimeException- if the given selector selects none or several elements from the currentSingleSearchable.
-