org.eclipse.incquery.runtime.rete.single

## Class UniquenessEnforcerNode

- java.lang.Object
- - org.eclipse.incquery.runtime.rete.network.BaseNode
  - - org.eclipse.incquery.runtime.rete.network.StandardNode
    - - org.eclipse.incquery.runtime.rete.single.UniquenessEnforcerNode

- All Implemented Interfaces:
    Node, Receiver, Supplier, Tunnel
  Direct Known Subclasses:
    DefaultProductionNode

      public class UniquenessEnforcerNode
      extends StandardNode
      implements Tunnel

  Ensures that no identical copies get to the output. Only one replica of each pattern substitution may traverse this node.
  Author:
    Gabor Bergmann

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `UniquenessEnforcerNode(ReteContainer reteContainer, int tupleWidth)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `appendParent(Supplier supplier)` appends a parent that will continously send insert and revoke updates to this supplier
    `void` | `assignTraceInfo(TraceInfo traceInfo)` assigns new traceability info to this node
    `ProjectionIndexer` | `constructIndex(TupleMask mask, TraceInfo... traces)` Instantiates (or reuses, depending on implementation) an index according to the given mask.
    `MemoryIdentityIndexer` | `getIdentityIndexer()`
    `TupleMemory` | `getMemory()`
    `MemoryNullIndexer` | `getNullIndexer()`
    `java.util.Collection<Supplier>` | `getParents()` access active parent
    `void` | `pullInto(java.util.Collection<Tuple> collector)` pulls the contents of this object in this particular moment into a target collection
    `void` | `removeParent(Supplier supplier)` removes a parent
    `void` | `update(Direction direction, Tuple updateElement)` updates the receiver with a newly found or lost partial matching

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

      `appendChild, getPulledContents, getReceivers, removeChild`

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

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

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

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

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

      `appendChild, getPulledContents, getReceivers, removeChild`

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

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

- - ### Constructor Detail

    - #### UniquenessEnforcerNode

          public UniquenessEnforcerNode(ReteContainer reteContainer,
                                        int tupleWidth)

  - ### Method Detail

    - #### getMemory

          public TupleMemory getMemory()

    - #### update

          public void update(Direction direction,
                             Tuple updateElement)

      Description copied from interface: `Receiver`
      updates the receiver with a newly found or lost partial matching
      Specified by:
        `update` in interface `Receiver`

    - #### constructIndex

          public ProjectionIndexer constructIndex(TupleMask mask,
                                                  TraceInfo... traces)

      Description copied from interface: `Supplier`
      Instantiates (or reuses, depending on implementation) an index according to the given mask. Intended for internal use; clients should invoke through Library instead to enable reusing.
      Specified by:
        `constructIndex` in interface `Supplier`
      Overrides:
        `constructIndex` in class `StandardNode`

    - #### pullInto

          public void pullInto(java.util.Collection<Tuple> collector)

      Description copied from interface: `Supplier`
      pulls the contents of this object in this particular moment into a target collection
      Specified by:
        `pullInto` in interface `Supplier`

    - #### getNullIndexer

          public MemoryNullIndexer getNullIndexer()

    - #### getIdentityIndexer

          public MemoryIdentityIndexer getIdentityIndexer()

    - #### appendParent

          public void appendParent(Supplier supplier)

      Description copied from interface: `Receiver`
      appends a parent that will continously send insert and revoke updates to this supplier
      Specified by:
        `appendParent` in interface `Receiver`

    - #### removeParent

          public void removeParent(Supplier supplier)

      Description copied from interface: `Receiver`
      removes a parent
      Specified by:
        `removeParent` in interface `Receiver`

    - #### getParents

          public java.util.Collection<Supplier> getParents()

      Description copied from interface: `Receiver`
      access active parent
      Specified by:
        `getParents` in interface `Receiver`

    - #### assignTraceInfo

          public void assignTraceInfo(TraceInfo traceInfo)

      Description copied from interface: `Node`
      assigns new traceability info to this node
      Specified by:
        `assignTraceInfo` in interface `Node`
      Overrides:
        `assignTraceInfo` in class `BaseNode`