Package org.openjdk.jmc.common.item
Class Aggregators
- java.lang.Object
-
- org.openjdk.jmc.common.item.Aggregators
-
public class Aggregators extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classAggregators.AdvancedMaxAggregator<V,T extends Comparable<T>>This aggregator separates the attribute for which to do the ordering from the attribute to use for accessing the value.static classAggregators.AdvancedMinAggregator<V,T extends Comparable<T>>This aggregator separates the attribute for which to do the ordering from the attribute to use for accessing the value.static classAggregators.AdvancedMinMaxConsumer<V,T extends Comparable<T>>This consumer separates the attribute for which to do the ordering from the attribute to use for accessing the value.static classAggregators.AggregatorBase<V,C extends IItemConsumer<C>>static classAggregators.Avgstatic classAggregators.AvgConsumerstatic classAggregators.CountConsumerstatic classAggregators.FieldAggregatorBase<V,C extends IItemConsumer<C>>static classAggregators.MergingAggregator<V,C extends IItemConsumer<C>>static classAggregators.MinMax<V extends Comparable<V>>static classAggregators.MinMaxConsumer<V extends Comparable<V>>static classAggregators.SetConsumer<T>static classAggregators.Stddevstatic classAggregators.Sumstatic classAggregators.Variancestatic classAggregators.VarianceConsumerConsumer for calculating stddev and variance in a one pass, numerically stable way.
-
Constructor Summary
Constructors Constructor Description Aggregators()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static IAggregator<Boolean,?>and(String typeId, IAttribute<Boolean> attribute)static IAggregator<IQuantity,?>avg(String name, String description, String typeId, IAttribute<IQuantity> attribute)static IAggregator<IQuantity,?>avg(String name, String description, IAttribute<IQuantity> attribute)static IAggregator<IQuantity,?>avg(String name, String description, KindOfQuantity<?> ct, IAccessorFactory<IQuantity> af)static IAggregator<IQuantity,?>avg(String typeId, IAttribute<IQuantity> attribute)static IAggregator<IQuantity,?>avg(IAttribute<IQuantity> attribute)static IAggregator<IQuantity,Aggregators.CountConsumer>count()static IAggregator<IQuantity,Aggregators.CountConsumer>count(String name, String description)static IAggregator<IQuantity,?>count(String name, String description, IItemFilter filter)static IAggregator<IQuantity,?>count(IItemFilter filter)static IAggregator<IQuantity,?>count(IType<?> type)static <T> IAggregator<IQuantity,?>countDistinct(String name, String description, IAccessorFactory<T> attribute)static <T> IAggregator<Set<T>,?>distinct(String name, IAccessorFactory<T> attribute)static <T> IAggregator<Set<T>,?>distinct(IAttribute<T> attribute)static IAggregator<String,?>distinctAsString(String typeId, IAttribute<String> attribute)static IAggregator<String,?>distinctAsString(IAttribute<String> attribute, String delimiter)static IAggregator<String,?>distinctAsString(IAttribute<String> attribute, String delimiter, String name, String description)static <V,C extends IItemConsumer<C>>
IAggregator<V,?>filter(String name, String description, IAggregator<V,C> aggregator, IItemFilter filter)static <V> IAggregator<V,?>filter(IAggregator<V,?> aggregator, IItemFilter filter)static <C extends IItemConsumer<C>>
IAggregator<C,C>forConsumer(IItemConsumerFactory<C> consumerFactory)static <C extends IItemConsumer<C>>
IAggregator<C,C>forConsumer(IItemConsumerFactory<C> consumerFactory, Predicate<IType<IItem>> acceptType)static IAggregator<IQuantity,?>getQuantityAggregator(String name)static IAggregator<IQuantity,?>getQuantityAggregator(String name, IAttribute<IQuantity> attribute)static IAggregator<IQuantity,?>getQuantityAggregator(String name, IType<?> type)static <V extends Comparable<V>>
IAggregator<IItem,?>itemWithMax(IAttribute<V> attribute)static <V extends Comparable<V>>
IAggregator<IItem,?>itemWithMin(IAttribute<V> attribute)static <V extends Comparable<V>>
IAggregator<V,?>max(String name, String description, String typeId, IAttribute<V> attribute)static <V extends Comparable<V>>
IAggregator<V,?>max(String name, String description, IAttribute<V> attribute)static IAggregator<IQuantity,?>max(String typeId, IAttribute<IQuantity> attribute)static <V extends Comparable<V>>
IAggregator<V,?>max(IAttribute<V> attribute)static <V extends Comparable<V>>
IAggregator<V,?>min(String name, String description, String typeId, IAttribute<V> attribute)static <V extends Comparable<V>>
IAggregator<V,?>min(String typeId, IAttribute<V> attribute)static <V extends Comparable<V>>
IAggregator<V,?>min(IAttribute<V> attribute)static IAggregator<Boolean,?>or(String typeId, IAttribute<Boolean> attribute)static IAggregator<IQuantity,?>stddev(String name, String description, IAttribute<IQuantity> attribute)Calculates the sample standard deviation for a linear quantity attribute.static IAggregator<IQuantity,?>stddev(IAttribute<IQuantity> attribute)Calculates the sample standard deviation for a linear quantity attribute.static IAggregator<IQuantity,?>stddevp(String name, String description, IAttribute<IQuantity> attribute)Calculates the population standard deviation for a linear quantity attribute.static IAggregator<IQuantity,?>stddevp(IAttribute<IQuantity> attribute)Calculates the population standard deviation for a linear quantity attribute.static IAggregator<IQuantity,?>sum(String name, String description, String typeId, IAttribute<IQuantity> attribute)static IAggregator<IQuantity,?>sum(String name, String description, IAttribute<IQuantity> attribute)static IAggregator<IQuantity,?>sum(String name, String description, LinearKindOfQuantity ct, IAccessorFactory<IQuantity> af)static IAggregator<IQuantity,?>sum(String typeId, IAttribute<IQuantity> attribute)static IAggregator<IQuantity,?>sum(IAttribute<IQuantity> attribute)static <V1,V2,C extends IItemConsumer<C>>
IAggregator<V2,C>valueBuilderAggregator(IAggregator<V1,C> aggregator, org.openjdk.jmc.common.item.IValueBuilder<V2,V1> valuebuilder, String name, String description)static IAggregator<IQuantity,?>variance(IAttribute<IQuantity> attribute)Calculates the sample variance for a linear quantity attribute.static IAggregator<IQuantity,?>variancep(IAttribute<IQuantity> attribute)Calculates the population variance for a linear quantity attribute.
-
-
-
Method Detail
-
itemWithMin
public static <V extends Comparable<V>> IAggregator<IItem,?> itemWithMin(IAttribute<V> attribute)
-
itemWithMax
public static <V extends Comparable<V>> IAggregator<IItem,?> itemWithMax(IAttribute<V> attribute)
-
filter
public static <V> IAggregator<V,?> filter(IAggregator<V,?> aggregator, IItemFilter filter)
-
filter
public static <V,C extends IItemConsumer<C>> IAggregator<V,?> filter(String name, String description, IAggregator<V,C> aggregator, IItemFilter filter)
-
sum
public static IAggregator<IQuantity,?> sum(IAttribute<IQuantity> attribute)
-
variance
public static IAggregator<IQuantity,?> variance(IAttribute<IQuantity> attribute)
Calculates the sample variance for a linear quantity attribute.- Parameters:
attribute- the attribute to calculate the sample variance for- Returns:
- the variance for the attribute
-
variancep
public static IAggregator<IQuantity,?> variancep(IAttribute<IQuantity> attribute)
Calculates the population variance for a linear quantity attribute.- Parameters:
attribute- the attribute to calculate the population variance for- Returns:
- the variance for the attribute
-
stddev
public static IAggregator<IQuantity,?> stddev(IAttribute<IQuantity> attribute)
Calculates the sample standard deviation for a linear quantity attribute.- Parameters:
attribute- the attribute to calculate the sample standard deviation for- Returns:
- the standard deviation for the attribute
-
stddev
public static IAggregator<IQuantity,?> stddev(String name, String description, IAttribute<IQuantity> attribute)
Calculates the sample standard deviation for a linear quantity attribute.- Parameters:
name- aggregator namedescription- aggregator descriptionattribute- the attribute to calculate the sample standard deviation for- Returns:
- an aggregator that calculates the standard deviation for the attribute
-
stddevp
public static IAggregator<IQuantity,?> stddevp(IAttribute<IQuantity> attribute)
Calculates the population standard deviation for a linear quantity attribute.- Parameters:
attribute- the attribute to calculate the population standard deviation for- Returns:
- an aggregator that calculates the standard deviation for the attribute
-
stddevp
public static IAggregator<IQuantity,?> stddevp(String name, String description, IAttribute<IQuantity> attribute)
Calculates the population standard deviation for a linear quantity attribute.- Parameters:
name- aggregator namedescription- aggregator descriptionattribute- the attribute to calculate the population standard deviation for- Returns:
- an aggregator that calculates the standard deviation for the attribute
-
sum
public static IAggregator<IQuantity,?> sum(String typeId, IAttribute<IQuantity> attribute)
-
sum
public static IAggregator<IQuantity,?> sum(String name, String description, IAttribute<IQuantity> attribute)
-
sum
public static IAggregator<IQuantity,?> sum(String name, String description, String typeId, IAttribute<IQuantity> attribute)
-
sum
public static IAggregator<IQuantity,?> sum(String name, String description, LinearKindOfQuantity ct, IAccessorFactory<IQuantity> af)
-
avg
public static IAggregator<IQuantity,?> avg(IAttribute<IQuantity> attribute)
-
avg
public static IAggregator<IQuantity,?> avg(String typeId, IAttribute<IQuantity> attribute)
-
avg
public static IAggregator<IQuantity,?> avg(String name, String description, IAttribute<IQuantity> attribute)
-
avg
public static IAggregator<IQuantity,?> avg(String name, String description, String typeId, IAttribute<IQuantity> attribute)
-
avg
public static IAggregator<IQuantity,?> avg(String name, String description, KindOfQuantity<?> ct, IAccessorFactory<IQuantity> af)
-
min
public static <V extends Comparable<V>> IAggregator<V,?> min(IAttribute<V> attribute)
-
min
public static <V extends Comparable<V>> IAggregator<V,?> min(String typeId, IAttribute<V> attribute)
-
min
public static <V extends Comparable<V>> IAggregator<V,?> min(String name, String description, String typeId, IAttribute<V> attribute)
-
max
public static <V extends Comparable<V>> IAggregator<V,?> max(IAttribute<V> attribute)
-
max
public static IAggregator<IQuantity,?> max(String typeId, IAttribute<IQuantity> attribute)
-
max
public static <V extends Comparable<V>> IAggregator<V,?> max(String name, String description, IAttribute<V> attribute)
-
max
public static <V extends Comparable<V>> IAggregator<V,?> max(String name, String description, String typeId, IAttribute<V> attribute)
-
count
public static IAggregator<IQuantity,Aggregators.CountConsumer> count()
-
count
public static IAggregator<IQuantity,Aggregators.CountConsumer> count(String name, String description)
-
count
public static IAggregator<IQuantity,?> count(IType<?> type)
-
count
public static IAggregator<IQuantity,?> count(IItemFilter filter)
-
count
public static IAggregator<IQuantity,?> count(String name, String description, IItemFilter filter)
-
and
public static IAggregator<Boolean,?> and(String typeId, IAttribute<Boolean> attribute)
-
or
public static IAggregator<Boolean,?> or(String typeId, IAttribute<Boolean> attribute)
-
distinctAsString
public static IAggregator<String,?> distinctAsString(String typeId, IAttribute<String> attribute)
-
distinctAsString
public static IAggregator<String,?> distinctAsString(IAttribute<String> attribute, String delimiter)
-
distinctAsString
public static IAggregator<String,?> distinctAsString(IAttribute<String> attribute, String delimiter, String name, String description)
-
valueBuilderAggregator
public static <V1,V2,C extends IItemConsumer<C>> IAggregator<V2,C> valueBuilderAggregator(IAggregator<V1,C> aggregator, org.openjdk.jmc.common.item.IValueBuilder<V2,V1> valuebuilder, String name, String description)
-
countDistinct
public static <T> IAggregator<IQuantity,?> countDistinct(String name, String description, IAccessorFactory<T> attribute)
-
distinct
public static <T> IAggregator<Set<T>,?> distinct(IAttribute<T> attribute)
-
distinct
public static <T> IAggregator<Set<T>,?> distinct(String name, IAccessorFactory<T> attribute)
-
forConsumer
public static <C extends IItemConsumer<C>> IAggregator<C,C> forConsumer(IItemConsumerFactory<C> consumerFactory)
-
forConsumer
public static <C extends IItemConsumer<C>> IAggregator<C,C> forConsumer(IItemConsumerFactory<C> consumerFactory, Predicate<IType<IItem>> acceptType)
-
getQuantityAggregator
public static IAggregator<IQuantity,?> getQuantityAggregator(String name, IAttribute<IQuantity> attribute)
-
getQuantityAggregator
public static IAggregator<IQuantity,?> getQuantityAggregator(String name, IType<?> type)
-
getQuantityAggregator
public static IAggregator<IQuantity,?> getQuantityAggregator(String name)
-
-