Schnittstelle ISearchableContainer<E>
- Typparameter:
E- is the type of the elements aISearchableContainer.
- Alle bekannten Unterschnittstellen:
IArrayList<E>,ICachingContainer<E>,IContainer<E>,ILinkedList<E>,IMatrix<E>
- Alle bekannten Implementierungsklassen:
ArrayList,ArrayView,CachingContainer,Container,ContainerView,ContainerView,GapMatrix,ImmutableList,IterableView,LinkedList,Matrix,MatrixColumn,MatrixRow,MultiContainerView
public interface ISearchableContainer<E>
- Version:
- 2023-10-14
- Autor:
- Silvan Wyss
-
Methodenübersicht
Modifizierer und TypMethodeBeschreibunggetOptionalStoredFirst(Predicate<? super E> selector) getStoredAt1BasedIndex(int p1BasedIndex) <C extends Comparable<C>>
EgetStoredByMax(Function<E, C> norm) <C extends Comparable<C>>
EgetStoredByMin(Function<E, C> norm) getStoredFirst(Predicate<? super E> selector) IContainer<? extends IContainer<E>> getStoredGroups(Function<E, ?> norm) <E2 extends E>
IContainer<E2> getStoredOfType(Class<E2> type) getStoredOne(Predicate<? super E> selector) getStoredOther(Predicate<E> selector) getStoredSelected(Predicate<? super E> selector)
-
Methodendetails
-
getOptionalStoredFirst
- Gibt zurück:
- a
Optionalwith the first element of the currentISearchableContainerif the currentISearchableContainercontains any, an emptyOptionalotherwise.
-
getOptionalStoredFirst
- Parameter:
selector-- Gibt zurück:
- a new
Optionalwith the first element the given selector selects from the currentISearchableContainerif the currentISearchableContainercontains an element the given selector selects, an emptyOptionalotherwise. - Löst aus:
RuntimeException- if the given selector is null.
-
getStoredAny
E getStoredAny()- Gibt zurück:
- a randomly selected element of the current
ISearchableContainer. - Löst aus:
RuntimeException- if the currentISearchableContaineris empty.
-
getStoredAt1BasedIndex
- Parameter:
p1BasedIndex-- Gibt zurück:
- the element at the given p1BasedIndex.
- Löst aus:
RuntimeException- if the currentISearchableContainerdoes not contain an element at the given p1BasedIndex.
-
getStoredByMax
- Typparameter:
C- is the type of theComparables the given norm returns.- Parameter:
norm-- Gibt zurück:
- the element with the biggest
Comparablethe given norm returns from the elements of the currentISearchableContainer. - Löst aus:
RuntimeException- if the currentISearchableContaineris empty.
-
getStoredByMin
- Typparameter:
C- is the type of theComparables the given norm returns.- Parameter:
norm-- Gibt zurück:
- the element with the smallest
Comparablethe given norm returns from the elements of the currentISearchableContainer. - Löst aus:
RuntimeException- if the currentISearchableContaineris empty.
-
getStoredFirst
E getStoredFirst()- Gibt zurück:
- the first element of the current
ISearchableContainer. - Löst aus:
RuntimeException- if the currentISearchableContaineris empty.
-
getStoredFirst
- Parameter:
selector-- Gibt zurück:
- the first element the given selector selects from the current
ISearchableContainer. - Löst aus:
RuntimeException- if the currentISearchableContainerdoes not contain an element the given selector selects.
-
getStoredGroups
- Parameter:
norm-- Gibt zurück:
- a new
ISearchableContainerwith groups with the elements of the currentISearchableContainergrouped by the given norm.
-
getStoredLast
E getStoredLast()- Gibt zurück:
- the last element of the current
ISearchableContainer. - Löst aus:
RuntimeException- if the currentISearchableContaineris empty.
-
getStoredOfType
- Typparameter:
E2- is the type of the elements of the returnedISearchableContainer.- Parameter:
type-- Gibt zurück:
- a new
ISearchableContainerwith the elements from the currentISearchableContainerthat are of the given type.
-
getStoredOne
E getStoredOne()- Gibt zurück:
- the one element of the current
ISearchableContainer. - Löst aus:
RuntimeException- if the currentISearchableContaineris empty.RuntimeException- if the currentISearchableContainercontains several elements.
-
getStoredOne
- Parameter:
selector-- Gibt zurück:
- the one element the given selector selects from the current
ISearchableContainer. - Löst aus:
RuntimeException- if the given selector selects none or several elements from the currentISearchableContainer.
-
getStoredOther
- Parameter:
selector-- Gibt zurück:
- a new
ISearchableContainerwith the elements from the currentISearchableContainerthe given selector skips (!).
-
getStoredSelected
- Parameter:
selector-- Gibt zurück:
- a new
ISearchableContainerwith the elements the given selector selects from the currentISearchableContainer.
-