Schnittstelle AggregationRequestable<E>
- Typparameter:
E- is the type of the elements aAggregationRequestable.
- 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 AggregationRequestable<E>
- Version:
- 2023-10-30
- Autor:
- Silvan Wyss
-
Methodenübersicht
Modifizierer und TypMethodeBeschreibungdoublegetAverage(Function<E, Number> valueMapper) doublegetAverageOrZero(Function<E, Number> valueMapper) <C extends Comparable<C>>
CdoublegetMaxOrZero(Function<E, Number> numberMapper) doubledoublegetMedianOrZero(Function<E, Number> numberMapper) <C extends Comparable<C>>
CdoublegetMinOrZero(Function<E, Number> numberMapper) doublegetStandardDeviation(Function<E, Number> numberMapper) getSumOfInts(ToIntFunction<E> intMapper) doublegetVariance(Function<E, Number> numberMapper)
-
Methodendetails
-
getAverage
- Parameter:
valueMapper-- Gibt zurück:
- the average of the values the given valueMapper maps from the
elements of the current
AggregationRequestable. Maps null elements to 0.0. - Löst aus:
RuntimeException- if the given valueMapper is null.RuntimeException- if the currentAggregationRequestableis empty.
-
getAverageOrZero
- Parameter:
valueMapper-- Gibt zurück:
- the average of the values the given valueMapper maps from the
elements of the current
AggregationRequestableif the currentAggregationRequestablecontains any, 0.0 otherwise. Maps null elements to 0.0. - Löst aus:
RuntimeException- if the given valueMapper is null.
-
getMax
- Typparameter:
C- is the type of theComparables the given comparableMapper maps from the elements of the currentAggregationRequestable.- Parameter:
comparableMapper-- Gibt zurück:
- the biggest
Comparablethe given comparableMapper maps from the elements of the currentAggregationRequestable. Ignores null elements. - Löst aus:
RuntimeException- if the given comparableMapper is null.RuntimeException- if the currentAggregationRequestabledoes not contain a non-null element.
-
getMaxOrZero
- Parameter:
numberMapper-- Gibt zurück:
- the biggest number the given numberMapper maps from the non-null
elements of the current
AggregationRequestableif the currentAggregationRequestablecontains non-null elements, 0.0 otherwise.
-
getMedian
- Parameter:
numberMapper-- Gibt zurück:
- the median of the numbers the given numberMapper maps from the
elements of the current
AggregationRequestable. Maps null elements to 0.0. - Löst aus:
RuntimeException- if the given numberMapper is null.RuntimeException- if the currentAggregationRequestableis empty.
-
getMedianOrZero
- Parameter:
numberMapper-- Gibt zurück:
- the median of the numbers the given numberMapper maps from the
elements of the current
AggregationRequestableif the currentAggregationRequestableis not empty, 0.0 otherwise. Maps null elements to 0.0. - Löst aus:
RuntimeException- if the given numberMapper is null.
-
getMin
- Typparameter:
C- is the type of theComparables the given comparableMapper maps from the elements of the currentAggregationRequestable.- Parameter:
comparableMapper-- Gibt zurück:
- the smallest
Comparablethe given comparableMapper maps from the elements of the currentAggregationRequestable. Ignores null elements. - Löst aus:
RuntimeException- if the given comparableMapper is null.RuntimeException- if the currentAggregationRequestabledoes not contain a non-null element.
-
getMinOrZero
- Parameter:
numberMapper-- Gibt zurück:
- the smallest number the given numberMapper maps from the non-null
elements of the current
AggregationRequestableif the currentAggregationRequestablecontains non-null elements, 0.0 otherwise.
-
getStandardDeviation
- Parameter:
numberMapper-- Gibt zurück:
- the standard deviation of the numbers the given numberMapper maps
from the elements of the current
AggregationRequestable. - Löst aus:
RuntimeException- if the given numberMapper is null.RuntimeException- if the currentAggregationRequestableis empty.
-
getSum
- Parameter:
valueMapper-- Gibt zurück:
- the sum of the values the given valueMapper maps from the elements of
the current
AggregationRequestable. Maps null elements to 0.0. - Löst aus:
RuntimeException- if the given valueMapper is null.
-
getSumOfInts
- Parameter:
intMapper-- Gibt zurück:
- the sum of the ints the given intMapper maps from the elements of the
current
AggregationRequestable. Maps null elements to 0.0. - Löst aus:
RuntimeException- if the given intMapper is null.
-
getVariance
- Parameter:
numberMapper-- Gibt zurück:
- the variance of the numbers the given numberMapper maps from the
elements of the current
AggregationRequestable. Maps null elements to 0.0. - Löst aus:
RuntimeException- if the given numberMapper is null.RuntimeException- if the currentAggregationRequestableis empty.
-