org.eclipse.viatra.query.runtime.matchers.psystem.aggregations

## Class AbstractMemorylessAggregationOperator<Domain,AggregateResult>

- java.lang.Object
- - org.eclipse.viatra.query.runtime.matchers.psystem.aggregations.AbstractMemorylessAggregationOperator<Domain,AggregateResult>

- All Implemented Interfaces:
    IMultisetAggregationOperator<Domain,AggregateResult,AggregateResult>
  Direct Known Subclasses:
    DoubleSumOperator, IntegerSumOperator, LongSumOperator

      public abstract class AbstractMemorylessAggregationOperator<Domain,AggregateResult>
      extends java.lang.Object
      implements IMultisetAggregationOperator<Domain,AggregateResult,AggregateResult>

  An aggregation operator that does not store interim results beyond the final aggregated value.
  Since:
    1.4

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `AbstractMemorylessAggregationOperator()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `AggregateResult` | `clone(AggregateResult original)` Clones the given accumulator (with all its internal contents).
    `AggregateResult` | `getAggregate(AggregateResult result)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface org.eclipse.viatra.query.runtime.matchers.psystem.aggregations.IMultisetAggregationOperator

      `aggregateStream, combine, contains, createNeutral, getName, getShortDescription, isNeutral, prettyPrint, update`

- - ### Constructor Detail

    - #### AbstractMemorylessAggregationOperator

          public AbstractMemorylessAggregationOperator()

  - ### Method Detail

    - #### getAggregate

          public AggregateResult getAggregate(AggregateResult result)

      Specified by:
        `getAggregate` in interface `IMultisetAggregationOperator<Domain,AggregateResult,AggregateResult>`
      Returns:
        the aggregate result obtained from the given intermediate result. May be null to indicate that the current multiset cannot be aggregated (e.g. 0 elements have no minimum).

    - #### clone

          public AggregateResult clone(AggregateResult original)

      Description copied from interface: `IMultisetAggregationOperator`
      Clones the given accumulator (with all its internal contents).
      Specified by:
        `clone` in interface `IMultisetAggregationOperator<Domain,AggregateResult,AggregateResult>`