org.eclipse.viatra.query.runtime.rete.index

## Class IdentityIndexer

- java.lang.Object
- - org.eclipse.viatra.query.runtime.rete.network.BaseNode
  - - org.eclipse.viatra.query.runtime.rete.index.StandardIndexer
    - - org.eclipse.viatra.query.runtime.rete.index.SpecializedProjectionIndexer
      - - org.eclipse.viatra.query.runtime.rete.index.IdentityIndexer

- All Implemented Interfaces:
    java.lang.Iterable<Tuple>, Indexer, IterableIndexer, ProjectionIndexer, Node
  Direct Known Subclasses:
    MemoryIdentityIndexer

      public abstract class IdentityIndexer
      extends SpecializedProjectionIndexer

  Defines an abstract trivial indexer that identically projects the contents of some stateful node, and can therefore save space. Can only exist in connection with a stateful store, and must be operated by another node (the active node). Do not attach parents directly!

- - ### Field Summary

    - ### Fields inherited from class org.eclipse.viatra.query.runtime.rete.index.SpecializedProjectionIndexer

      `activeNode`

    - ### Fields inherited from class org.eclipse.viatra.query.runtime.rete.index.StandardIndexer

      `listeners, mask, parent`

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

      `nodeId, reteContainer, tag, traceInfos`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `IdentityIndexer(ReteContainer reteContainer, int tupleWidth, Supplier parent, Node activeNode)`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected boolean` | `contains(Tuple signature)`
    `java.util.Collection<Tuple>` | `get(Tuple signature)`
    `java.util.Collection<Tuple>` | `getSignatures()` A collection consisting of exactly those signatures whose tuple group is not empty CONTRACT: do not modify
    `protected abstract java.util.Collection<Tuple>` | `getTuples()`
    `java.util.Iterator<Tuple>` | `iterator()`
    `void` | `propagate(Direction direction, Tuple updateElement)`

    - ### Methods inherited from class org.eclipse.viatra.query.runtime.rete.index.SpecializedProjectionIndexer

      `getActiveNode`

    - ### Methods inherited from class org.eclipse.viatra.query.runtime.rete.index.StandardIndexer

      `assignTraceInfo, attachListener, detachListener, getContainer, getListeners, getMask, getParent, propagate, toStringCore`

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

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

    - ### 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.index.Indexer

      `attachListener, detachListener, getListeners, getMask, getParent`

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

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

    - ### Methods inherited from interface java.lang.Iterable

      `forEach, spliterator`

- - ### Constructor Detail

    - #### IdentityIndexer

          public IdentityIndexer(ReteContainer reteContainer,
                                 int tupleWidth,
                                 Supplier parent,
                                 Node activeNode)

  - ### Method Detail

    - #### getTuples

          protected abstract java.util.Collection<Tuple> getTuples()

    - #### get

          public java.util.Collection<Tuple> get(Tuple signature)

      Returns:
        all stored tuples that conform to the specified signature, null if there are none such. CONTRACT: do not modify!

    - #### contains

          protected boolean contains(Tuple signature)

      Parameters:
        `signature` -
      Returns:

    - #### getSignatures

          public java.util.Collection<Tuple> getSignatures()

      Description copied from interface: `IterableIndexer`
      A collection consisting of exactly those signatures whose tuple group is not empty CONTRACT: do not modify

    - #### iterator

          public java.util.Iterator<Tuple> iterator()

    - #### propagate

          public void propagate(Direction direction,
                                Tuple updateElement)