Schnittstelle IStatisticalConainer<E>
- Typparameter:
E
- is the type of the elements aIStatisticalConainer
.
- Alle bekannten Unterschnittstellen:
IArrayList<E>
,ICachingContainer<E>
,IContainer<E>
,ILinkedList<E>
,IMatrix<E>
,ISqlRecord
- Alle bekannten Implementierungsklassen:
ArrayList
,ArrayView
,CachingContainer
,Container
,ContainerView
,ContainerView
,FilterContainerView
,ImmutableList
,IterableView
,LinkedList
,Matrix
,MatrixColumn
,MatrixRow
,MultiContainerView
,SqlRecord
public interface IStatisticalConainer<E>
- Version:
- 2023-10-30
- Autor:
- Silvan Wyss
-
Methodenübersicht
Modifizierer und TypMethodeBeschreibungdouble
getAverage
(Function<E, Number> valueMapper) double
getAverageOrZero
(Function<E, Number> valueMapper) <C extends Comparable<C>>
Cdouble
getMaxOrZero
(Function<E, Number> numberMapper) double
double
getMedianOrZero
(Function<E, Number> numberMapper) <C extends Comparable<C>>
Cdouble
getMinOrZero
(Function<E, Number> numberMapper) double
getStandardDeviation
(Function<E, Number> numberMapper) getSumOfInts
(ToIntFunction<E> intMapper) double
getVariance
(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
IStatisticalConainer
. Maps null elements to 0.0. - Löst aus:
RuntimeException
- if the given valueMapper is null.RuntimeException
- if the currentIStatisticalConainer
is empty.
-
getAverageOrZero
- Parameter:
valueMapper
-- Gibt zurück:
- the average of the values the given valueMapper maps from the
elements of the current
IStatisticalConainer
if the currentIStatisticalConainer
contains 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 theComparable
s the given comparableMapper maps from the elements of the currentIStatisticalConainer
.- Parameter:
comparableMapper
-- Gibt zurück:
- the biggest
Comparable
the given comparableMapper maps from the elements of the currentIStatisticalConainer
. Ignores null elements. - Löst aus:
RuntimeException
- if the given comparableMapper is null.RuntimeException
- if the currentIStatisticalConainer
does 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
IStatisticalConainer
if the currentIStatisticalConainer
contains 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
IStatisticalConainer
. Maps null elements to 0.0. - Löst aus:
RuntimeException
- if the given numberMapper is null.RuntimeException
- if the currentIStatisticalConainer
is empty.
-
getMedianOrZero
- Parameter:
numberMapper
-- Gibt zurück:
- the median of the numbers the given numberMapper maps from the
elements of the current
IStatisticalConainer
if the currentIStatisticalConainer
is 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 theComparable
s the given comparableMapper maps from the elements of the currentIStatisticalConainer
.- Parameter:
comparableMapper
-- Gibt zurück:
- the smallest
Comparable
the given comparableMapper maps from the elements of the currentIStatisticalConainer
. Ignores null elements. - Löst aus:
RuntimeException
- if the given comparableMapper is null.RuntimeException
- if the currentIStatisticalConainer
does 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
IStatisticalConainer
if the currentIStatisticalConainer
contains 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
IStatisticalConainer
. - Löst aus:
RuntimeException
- if the given numberMapper is null.RuntimeException
- if the currentIStatisticalConainer
is empty.
-
getSum
- Parameter:
valueMapper
-- Gibt zurück:
- the sum of the values the given valueMapper maps from the elements of
the current
IStatisticalConainer
. 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
IStatisticalConainer
. 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
IStatisticalConainer
. Maps null elements to 0.0. - Löst aus:
RuntimeException
- if the given numberMapper is null.RuntimeException
- if the currentIStatisticalConainer
is empty.
-