Class LongSumOperator
java.lang.Object
tools.refinery.interpreter.matchers.psystem.aggregations.AbstractMemorylessAggregationOperator<Long,Long>
tools.refinery.interpreter.matchers.aggregators.LongSumOperator
- All Implemented Interfaces:
IMultisetAggregationOperator<Long,
Long, Long>
Incrementally computes the sum of java.lang.Long values
- Since:
- 1.4
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionaggregateStream
(Stream<Long> stream) Calculates the aggregate results from a given stream of values; all values are considered as insertedgetName()
A name or identifier of the operator.A textual description of the operator.boolean
Methods inherited from class tools.refinery.interpreter.matchers.psystem.aggregations.AbstractMemorylessAggregationOperator
clone, getAggregate
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface tools.refinery.interpreter.matchers.psystem.aggregations.IMultisetAggregationOperator
combine, contains, prettyPrint
-
Field Details
-
INSTANCE
-
-
Method Details
-
getShortDescription
Description copied from interface:IMultisetAggregationOperator
A textual description of the operator. -
getName
Description copied from interface:IMultisetAggregationOperator
A name or identifier of the operator. -
createNeutral
- Returns:
- the neutral element, i.e. the interim result of aggregating an empty multiset.
-
isNeutral
- Returns:
- true if the interim result is equivalent to the neutral element, as if there are no values in the multiset. Must return true if the multiset is empty.
-
update
- Returns:
- an updated intermediate result, changed to reflect that a given object was added to / removed from the multiset (as indicated by the parameter isInsertion)
-
aggregateStream
Description copied from interface:IMultisetAggregationOperator
Calculates the aggregate results from a given stream of values; all values are considered as inserted- Returns:
- the aggregate result, or null if no result can be calculated (e.g. because of an empty stream)
- Since:
- 2.0
-