Sum can be used with most numeric types
| Modifier and Type | Class and Description |
|---|---|
| pack-priv abstract static class | Sum.Engine
Abstract super-class for all sum calculating engines. |
| Modifier and Type | Method and Description |
|---|---|
| public void | accept(Object
a single input value input)Implements net. Note null inputs are ignored |
| public Number | aggregateResult()
Implements net. Note May return null if no input supplied |
| public Sum | createClone()
Implements net. |
| public Attribute | getAttribute()
Implements net. |
| attribute | back to summary |
|---|---|
| private final Attribute<?> attribute | |
| engine | back to summary |
|---|---|
| private Sum. | |
| Sum | back to summary |
|---|---|
| public Sum(Attribute<?> attribute) | |
| accept | back to summary |
|---|---|
| public void accept(Object input) throws AggregatorException Implements net. Doc from net. Add the given value to the aggregator function Note null inputs are ignored
| |
| aggregateResult | back to summary |
|---|---|
| public Number aggregateResult() Implements net. Doc from net. Retrieve the final result Note May return null if no input supplied
| |
| createClone | back to summary |
|---|---|
| public Sum createClone() Implements net. Doc from net. Create a clone of this aggregator, detaching from its result | |
| getAttribute | back to summary |
|---|---|
| public Attribute Implements net. Doc from net. Get the attribute to pass to aggregator
| |
| Modifier and Type | Class and Description |
|---|---|
| pack-priv static class | Sum.Engine.DoubleEngine
A double based summing engine. |
| pack-priv static class | Sum.Engine.FloatEngine
A float based summing engine. |
| pack-priv static class | Sum.Engine.LongEngine
A long based summing engine. |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv abstract void | |
| pack-priv static Sum. | |
| pack-priv abstract Number |
| Engine | back to summary |
|---|---|
| pack-priv Engine() | |
| accept | back to summary |
|---|---|
| pack-priv abstract void accept(Number input) throws AggregatorException Update the engine with the given value.
| |
| create | back to summary |
|---|---|
| pack-priv static Sum. Create a type specific engine using the given initial value. | |
| result | back to summary |
|---|---|
| pack-priv abstract Number result() Get the (current) result of this engine.
| |
| Modifier and Type | Field and Description |
|---|---|
| private double |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv void | accept(Number
data value input)Implements abstract net. |
| pack-priv Number | result()
Implements abstract net. |
| sum | back to summary |
|---|---|
| private double sum | |
| DoubleEngine | back to summary |
|---|---|
| pack-priv DoubleEngine(double value) Creates a new instance starting with an initial value
| |
| accept | back to summary |
|---|---|
| pack-priv void accept(Number input) throws AggregatorException Implements abstract net. Doc from net. Update the engine with the given value. | |
| result | back to summary |
|---|---|
| pack-priv Number result() Implements abstract net. Doc from net. Get the (current) result of this engine. | |
| Modifier and Type | Field and Description |
|---|---|
| private float |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv void | accept(Number
data value input)Implements abstract net. |
| pack-priv Number | result()
Implements abstract net. |
| sum | back to summary |
|---|---|
| private float sum | |
| FloatEngine | back to summary |
|---|---|
| pack-priv FloatEngine(float value) Creates a new instance starting with an initial value
| |
| accept | back to summary |
|---|---|
| pack-priv void accept(Number input) throws AggregatorException Implements abstract net. Doc from net. Update the engine with the given value. | |
| result | back to summary |
|---|---|
| pack-priv Number result() Implements abstract net. Doc from net. Get the (current) result of this engine. | |
| Modifier and Type | Field and Description |
|---|---|
| private long |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv void | accept(Number
data value input)Implements abstract net. |
| pack-priv Number | result()
Implements abstract net. |
| sum | back to summary |
|---|---|
| private long sum | |
| LongEngine | back to summary |
|---|---|
| pack-priv LongEngine(long value) Creates a new instance starting with an initial value
| |
| accept | back to summary |
|---|---|
| pack-priv void accept(Number input) throws AggregatorException Implements abstract net. Doc from net. Update the engine with the given value. | |
| result | back to summary |
|---|---|
| pack-priv Number result() Implements abstract net. Doc from net. Get the (current) result of this engine. | |