Class CollectAccumulator

    • Constructor Detail

      • CollectAccumulator

        public CollectAccumulator()
      • CollectAccumulator

        public CollectAccumulator​(Collect collect,
                                  boolean unwrapHandle)
    • Method Detail

      • readExternal

        public void readExternal​(java.io.ObjectInput in)
                          throws java.io.IOException,
                                 java.lang.ClassNotFoundException
        Specified by:
        readExternal in interface java.io.Externalizable
        Throws:
        java.io.IOException
        java.lang.ClassNotFoundException
      • writeExternal

        public void writeExternal​(java.io.ObjectOutput out)
                           throws java.io.IOException
        Specified by:
        writeExternal in interface java.io.Externalizable
        Throws:
        java.io.IOException
      • createContext

        public java.lang.Object createContext()
        Description copied from interface: Accumulator
        Creates the context object for an accumulator session. The context is passed as a parameter to every subsequent accumulator method call in the same session.
        Specified by:
        createContext in interface Accumulator
        Returns:
      • init

        public java.lang.Object init​(java.lang.Object workingMemoryContext,
                                     java.lang.Object context,
                                     Tuple leftTuple,
                                     Declaration[] declarations,
                                     ReteEvaluator reteEvaluator)
        Description copied from interface: Accumulator
        Executes the initialization block of code
        Specified by:
        init in interface Accumulator
        leftTuple - tuple causing the rule fire
        declarations - previous declarations
      • getResult

        public java.lang.Object getResult​(java.lang.Object workingMemoryContext,
                                          java.lang.Object context,
                                          Tuple leftTuple,
                                          Declaration[] declarations,
                                          ReteEvaluator reteEvaluator)
        Description copied from interface: Accumulator
        Gets the result of the accummulation
        Specified by:
        getResult in interface Accumulator
        Returns:
      • supportsReverse

        public boolean supportsReverse()
        Description copied from interface: Accumulator
        Returns true if this accumulator supports operation reversal
        Specified by:
        supportsReverse in interface Accumulator
        Returns:
      • createWorkingMemoryContext

        public java.lang.Object createWorkingMemoryContext()
        Description copied from interface: Accumulator
        Creates and return a context object for each working memory instance
        Specified by:
        createWorkingMemoryContext in interface Accumulator
        Returns: