Class AbstractNumberAggregation<T extends Number>
java.lang.Object
io.jmix.flowui.data.aggregation.impl.AbstractAggregation<T>
io.jmix.flowui.data.aggregation.impl.AbstractNumberAggregation<T>
- Type Parameters:
T- the type of number being aggregated
- All Implemented Interfaces:
Aggregation<T>
- Direct Known Subclasses:
BigDecimalAggregation,BigIntegerAggregation,DoubleAggregation,LongAggregation
Abstract base class for performing aggregation operations on collections
of numerical data.
-
Field Summary
Fields inherited from class io.jmix.flowui.data.aggregation.impl.AbstractAggregation
clazz -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionavg(Collection<T> items) Computes the average value of the elements in the provided collection.protected abstract TReturns the set of aggregation types that are supported by this class.max(Collection<T> items) Determines the maximum value in the provided collection of items.min(Collection<T> items) Determines the minimum value in the provided collection of items.sum(Collection<T> items) Calculates the sum of the provided collection of items.Methods inherited from class io.jmix.flowui.data.aggregation.impl.AbstractAggregation
count, getResultClass
-
Constructor Details
-
AbstractNumberAggregation
-
-
Method Details
-
sum
Description copied from interface:AggregationCalculates the sum of the provided collection of items.- Specified by:
sumin interfaceAggregation<T extends Number>- Overrides:
sumin classAbstractAggregation<T extends Number>- Parameters:
items- the collection of items to be summed- Returns:
- the sum of the items, or
nullif the collection is empty
-
avg
Description copied from interface:AggregationComputes the average value of the elements in the provided collection.- Specified by:
avgin interfaceAggregation<T extends Number>- Overrides:
avgin classAbstractAggregation<T extends Number>- Parameters:
items- the collection of elements to be averaged- Returns:
- the average value of the elements, or
nullif the collection is empty
-
min
Description copied from interface:AggregationDetermines the minimum value in the provided collection of items.- Specified by:
minin interfaceAggregation<T extends Number>- Overrides:
minin classAbstractAggregation<T extends Number>- Parameters:
items- the collection of items to evaluate for the minimum value- Returns:
- the minimum value from the collection, or
nullif the collection is empty
-
max
Description copied from interface:AggregationDetermines the maximum value in the provided collection of items.- Specified by:
maxin interfaceAggregation<T extends Number>- Overrides:
maxin classAbstractAggregation<T extends Number>- Parameters:
items- the collection of items to evaluate for the maximum value- Returns:
- the maximum value from the collection, or
nullif the collection is empty
-
getSupportedAggregationTypes
Description copied from interface:AggregationReturns the set of aggregation types that are supported by this class.- Specified by:
getSupportedAggregationTypesin interfaceAggregation<T extends Number>- Overrides:
getSupportedAggregationTypesin classAbstractAggregation<T extends Number>- Returns:
- a set of supported aggregation types
-
convert
-