org.optaplanner.core.impl.score.stream.drools.common

## Class DroolsAbstractAccumulateFunction<ResultContainer_,InTuple,OutTuple>

- java.lang.Object
- - org.optaplanner.core.impl.score.stream.drools.common.DroolsAbstractAccumulateFunction<ResultContainer_,InTuple,OutTuple>

- All Implemented Interfaces:
    Externalizable, Serializable, org.kie.api.runtime.rule.AccumulateFunction<DroolsAccumulateContext<ResultContainer_>>

      public abstract class DroolsAbstractAccumulateFunction<ResultContainer_,InTuple,OutTuple>
      extends Object
      implements org.kie.api.runtime.rule.AccumulateFunction<DroolsAccumulateContext<ResultContainer_>>

  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `DroolsAbstractAccumulateFunction()`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `accumulate(DroolsAccumulateContext<ResultContainer_> context, Object value)`
    `protected abstract Runnable` | `accumulate(ResultContainer_ container, InTuple tuple)`
    `DroolsAccumulateContext<ResultContainer_>` | `createContext()`
    `Object` | `getResult(DroolsAccumulateContext<ResultContainer_> context)`
    `protected abstract OutTuple` | `getResult(ResultContainer_ container)`
    `Class<?>` | `getResultType()`
    `void` | `init(DroolsAccumulateContext<ResultContainer_> context)`
    `protected abstract ResultContainer_` | `newContainer()`
    `void` | `readExternal(ObjectInput in)`
    `void` | `reverse(DroolsAccumulateContext<ResultContainer_> context, Object value)`
    `boolean` | `supportsReverse()`
    `void` | `writeExternal(ObjectOutput out)`

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

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

    - ### Methods inherited from interface org.kie.api.runtime.rule.AccumulateFunction

      `accumulateValue, initContext, tryReverse`

- - ### Constructor Detail

    - #### DroolsAbstractAccumulateFunction

          public DroolsAbstractAccumulateFunction()

  - ### Method Detail

    - #### createContext

          public DroolsAccumulateContext<ResultContainer_> createContext()

      Specified by:
        `createContext` in interface `org.kie.api.runtime.rule.AccumulateFunction<DroolsAccumulateContext<ResultContainer_>>`

    - #### init

          public void init(DroolsAccumulateContext<ResultContainer_> context)

      Specified by:
        `init` in interface `org.kie.api.runtime.rule.AccumulateFunction<DroolsAccumulateContext<ResultContainer_>>`

    - #### accumulate

          public void accumulate(DroolsAccumulateContext<ResultContainer_> context,
                                 Object value)

      Specified by:
        `accumulate` in interface `org.kie.api.runtime.rule.AccumulateFunction<DroolsAccumulateContext<ResultContainer_>>`

    - #### reverse

          public void reverse(DroolsAccumulateContext<ResultContainer_> context,
                              Object value)

      Specified by:
        `reverse` in interface `org.kie.api.runtime.rule.AccumulateFunction<DroolsAccumulateContext<ResultContainer_>>`

    - #### getResult

          public Object getResult(DroolsAccumulateContext<ResultContainer_> context)

      Specified by:
        `getResult` in interface `org.kie.api.runtime.rule.AccumulateFunction<DroolsAccumulateContext<ResultContainer_>>`

    - #### supportsReverse

          public boolean supportsReverse()

      Specified by:
        `supportsReverse` in interface `org.kie.api.runtime.rule.AccumulateFunction<DroolsAccumulateContext<ResultContainer_>>`

    - #### getResultType

          public Class<?> getResultType()

      Specified by:
        `getResultType` in interface `org.kie.api.runtime.rule.AccumulateFunction<DroolsAccumulateContext<ResultContainer_>>`

    - #### writeExternal

          public void writeExternal(ObjectOutput out)

      Specified by:
        `writeExternal` in interface `Externalizable`

    - #### readExternal

          public void readExternal(ObjectInput in)

      Specified by:
        `readExternal` in interface `Externalizable`

    - #### newContainer

          protected abstract ResultContainer_ newContainer()

    - #### accumulate

          protected abstract Runnable accumulate(ResultContainer_ container,
                                                 InTuple tuple)

    - #### getResult

          protected abstract OutTuple getResult(ResultContainer_ container)

Copyright © 2006–2021 JBoss by Red Hat. All rights reserved.