org.eclipse.viatra.query.runtime.rete.single

## Class TrimmerNode

- java.lang.Object
- - org.eclipse.viatra.query.runtime.rete.network.BaseNode
  - - org.eclipse.viatra.query.runtime.rete.network.StandardNode
    - - org.eclipse.viatra.query.runtime.rete.single.SingleInputNode
      - - org.eclipse.viatra.query.runtime.rete.single.TransformerNode
        - - org.eclipse.viatra.query.runtime.rete.single.TrimmerNode

- All Implemented Interfaces:
    NetworkStructureChangeSensitiveNode, Node, Receiver, Supplier, Tunnel

      public class TrimmerNode
      extends TransformerNode

  Trims the matchings as specified by a mask.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected TupleMask` | `mask`

    - ### Fields inherited from class org.eclipse.viatra.query.runtime.rete.single.SingleInputNode

      `mailbox, parent`

    - ### Fields inherited from class org.eclipse.viatra.query.runtime.rete.network.StandardNode

      `childMailboxes, children`

    - ### Fields inherited from class org.eclipse.viatra.query.runtime.rete.network.BaseNode

      `nodeId, reteContainer, tag, traceInfos`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `TrimmerNode(ReteContainer reteContainer)`
    `TrimmerNode(ReteContainer reteContainer, TupleMask mask)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `TupleMask` | `getMask()`
    `void` | `setMask(TupleMask mask)`
    `protected Tuple` | `transform(Tuple input)`

    - ### Methods inherited from class org.eclipse.viatra.query.runtime.rete.single.TransformerNode

      `pullInto, pullIntoWithTimeline, update`

    - ### Methods inherited from class org.eclipse.viatra.query.runtime.rete.single.SingleInputNode

      `appendParent, assignTraceInfo, getCommunicationTracker, getMailbox, getParents, instantiateMailbox, propagatePullInto, propagatePullIntoWithTimestamp, removeParent`

    - ### Methods inherited from class org.eclipse.viatra.query.runtime.rete.network.StandardNode

      `appendChild, constructIndex, getChildMailboxes, getPulledContents, getReceivers, issueError, networkStructureChanged, propagateUpdate, removeChild`

    - ### Methods inherited from class org.eclipse.viatra.query.runtime.rete.network.BaseNode

      `acceptPropagatedTraceInfo, getContainer, getNodeId, getTag, getTraceInfoPatternsEnumerated, getTraceInfos, setTag, toString, toStringCore`

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

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

    - ### Methods inherited from interface org.eclipse.viatra.query.runtime.rete.network.Supplier

      `appendChild, constructIndex, getPulledContents, getPulledContents, getReceivers, removeChild`

    - ### Methods inherited from interface org.eclipse.viatra.query.runtime.rete.network.Receiver

      `batchUpdate`

    - ### Methods inherited from interface org.eclipse.viatra.query.runtime.rete.network.Node

      `acceptPropagatedTraceInfo, getContainer, getNodeId, getTag, getTraceInfos, setTag`

- - ### Field Detail

    - #### mask

          protected TupleMask mask

  - ### Constructor Detail

    - #### TrimmerNode

          public TrimmerNode(ReteContainer reteContainer,
                             TupleMask mask)

      Parameters:
        `reteContainer` -
        `mask` - The mask used to trim substitutions.

    - #### TrimmerNode

          public TrimmerNode(ReteContainer reteContainer)

  - ### Method Detail

    - #### getMask

          public TupleMask getMask()

      Returns:
        the mask

    - #### setMask

          public void setMask(TupleMask mask)

      Parameters:
        `mask` - the mask to set

    - #### transform

          protected Tuple transform(Tuple input)

      Specified by:
        `transform` in class `TransformerNode`