Package org.openjdk.jmc.common.item
Class Aggregators
java.lang.Object
org.openjdk.jmc.common.item.Aggregators
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
Aggregators.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 class
Aggregators.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 class
Aggregators.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 class
Aggregators.AggregatorBase<V,
C extends IItemConsumer<C>> static class
static class
static class
static class
Aggregators.FieldAggregatorBase<V,
C extends IItemConsumer<C>> static class
Aggregators.MergingAggregator<V,
C extends IItemConsumer<C>> static class
Aggregators.MinMax<V extends Comparable<V>>
static class
Aggregators.MinMaxConsumer<V extends Comparable<V>>
static class
static class
static class
static class
static class
Consumer for calculating stddev and variance in a one pass, numerically stable way. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic IAggregator<Boolean,
?> and
(String typeId, IAttribute<Boolean> attribute) static IAggregator<IQuantity,
?> 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) count()
static IAggregator<IQuantity,
?> count
(String name, String description, IItemFilter filter) static IAggregator<IQuantity,
?> count
(IItemFilter filter) static IAggregator<IQuantity,
?> 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 <T> IAggregator<IQuantity,
?> getJvmPid
(String typeId, IAttribute<T> attribute) 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,
?> static IAggregator<IQuantity,
?> sum
(String name, String description, String typeId, IAttribute<IQuantity> attribute, Predicate<Double> predicate) 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.
-
Constructor Details
-
Aggregators
public Aggregators()
-
-
Method Details
-
itemWithMin
-
itemWithMax
-
filter
-
filter
public static <V,C extends IItemConsumer<C>> IAggregator<V,?> filter(String name, String description, IAggregator<V, C> aggregator, IItemFilter filter) -
sum
-
variance
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
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
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
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
-
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, String typeId, IAttribute<IQuantity> attribute, Predicate<Double> predicate) -
sum
public static IAggregator<IQuantity,?> sum(String name, String description, LinearKindOfQuantity ct, IAccessorFactory<IQuantity> af) -
avg
-
avg
-
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
-
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
-
max
-
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
-
count
public static IAggregator<IQuantity,Aggregators.CountConsumer> count(String name, String description) -
count
-
count
-
count
-
and
-
or
-
distinctAsString
-
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, IAggregator<V2,C extends IItemConsumer<C>> C> valueBuilderAggregator(IAggregator<V1, C> aggregator, org.openjdk.jmc.common.item.IValueBuilder<V2, V1> valuebuilder, String name, String description) -
getJvmPid
-
countDistinct
public static <T> IAggregator<IQuantity,?> countDistinct(String name, String description, IAccessorFactory<T> attribute) -
distinct
-
distinct
-
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
-
getQuantityAggregator
-