Class GenericProjectionIndexer

All Implemented Interfaces:
Iterable<Tuple>, Indexer, IterableIndexer, ProjectionIndexer, ResumableNode, IGroupable, NetworkStructureChangeSensitiveNode, Node, Receiver
Direct Known Subclasses:
OnetimeIndexer

public class GenericProjectionIndexer extends IndexerWithMemory implements ProjectionIndexer
A generic Indexer capable of indexing along any valid TupleMask. Does not keep track of parents, because will not ever pull parents.
  • Constructor Details

  • Method Details

    • update

      protected void update(Direction direction, Tuple updateElement, Tuple signature, boolean change, Timestamp timestamp)
      Description copied from class: IndexerWithMemory
      Refined version of update
      Specified by:
      update in class IndexerWithMemory
    • get

      public Collection<Tuple> get(Tuple signature)
      Specified by:
      get in interface Indexer
      Returns:
      all stored tuples that conform to the specified signature, null if there are none such. CONTRACT: do not modify!
    • getTimeline

      public Map<Tuple,Timeline<Timestamp>> getTimeline(Tuple signature)
      Specified by:
      getTimeline in interface Indexer
    • iterator

      public Iterator<Tuple> iterator()
      Specified by:
      iterator in interface Iterable<Tuple>
    • getSignatures

      public Iterable<Tuple> getSignatures()
      Description copied from interface: IterableIndexer
      A view consisting of exactly those signatures whose tuple group is not empty
      Specified by:
      getSignatures in interface IterableIndexer
    • getBucketCount

      public int getBucketCount()
      Specified by:
      getBucketCount in interface IterableIndexer
      Returns:
      the number of signatures whose tuple group is not empty
      Since:
      2.0
    • getActiveNode

      public Receiver getActiveNode()
      Description copied from interface: Indexer
      This indexer will be updated whenever a Rete update is sent to the active node (or an equivalent time slot allotted to it). The active node is typically the indexer itself, but it can be a different node such as its parent.
      Specified by:
      getActiveNode in interface Indexer
      Returns:
      the active node that operates this indexer