public class NamedAggregators
extends java.lang.Object
implements java.io.Serializable
Modifier and Type | Class and Description |
---|---|
static class |
NamedAggregators.CombineFunctionState<InputT,InterT,OutputT> |
static interface |
NamedAggregators.State<InputT,InterT,OutputT> |
Constructor and Description |
---|
NamedAggregators()
Constructs a new NamedAggregators instance.
|
NamedAggregators(java.lang.String name,
NamedAggregators.State<?,?,?> state)
Constructs a new named aggregators instance that contains a mapping from the specified
`named` to the associated initial state.
|
Modifier and Type | Method and Description |
---|---|
<T> T |
getValue(java.lang.String name,
java.lang.Class<T> typeClass) |
NamedAggregators |
merge(NamedAggregators other)
Merges another NamedAggregators instance with this instance.
|
java.util.Map<java.lang.String,?> |
renderAll() |
java.lang.String |
toString() |
public NamedAggregators()
public NamedAggregators(java.lang.String name, NamedAggregators.State<?,?,?> state)
name
- Name of aggregator.state
- Associated State.public <T> T getValue(java.lang.String name, java.lang.Class<T> typeClass)
T
- Type to be returned.name
- Name of aggregator to retrieve.typeClass
- Type class to cast the value to.null
if the specified aggregator could not be found.public java.util.Map<java.lang.String,?> renderAll()
public NamedAggregators merge(NamedAggregators other)
other
- The other instance of named aggregators ot merge.public java.lang.String toString()
toString
in class java.lang.Object