Class BaseNode

java.lang.Object
tools.refinery.interpreter.rete.network.BaseNode
All Implemented Interfaces:
Node
Direct Known Subclasses:
SimpleReceiver, StandardIndexer, StandardNode

public abstract class BaseNode extends Object implements Node
Base implementation for a Rete node.
  • Field Details

    • reteContainer

      protected ReteContainer reteContainer
    • nodeId

      protected long nodeId
    • tag

      protected Object tag
    • traceInfos

      protected Set<TraceInfo> traceInfos
  • Constructor Details

    • BaseNode

      public BaseNode(ReteContainer reteContainer)
      Parameters:
      reteContainer - the container to create this node in
  • Method Details

    • toString

      public String toString()
      Overrides:
      toString in class Object
    • toStringCore

      protected String toStringCore()
      clients should override this to append before the tag / trace indicators
    • getContainer

      public ReteContainer getContainer()
      Specified by:
      getContainer in interface Node
      Returns:
      the network this node belongs to.
    • getNodeId

      public long getNodeId()
      Specified by:
      getNodeId in interface Node
      Returns:
      the identifier unique to this node within the network.
    • getTag

      public Object getTag()
      Specified by:
      getTag in interface Node
      Returns:
      the tag of the node
    • setTag

      public void setTag(Object tag)
      Description copied from interface: Node
      Assigns a descriptive tag to the node
      Specified by:
      setTag in interface Node
    • getTraceInfos

      public Set<TraceInfo> getTraceInfos()
      Specified by:
      getTraceInfos in interface Node
      Returns:
      unmodifiable view of the list of traceability infos assigned to this node
    • assignTraceInfo

      public void assignTraceInfo(TraceInfo traceInfo)
      Description copied from interface: Node
      assigns new traceability info to this node
      Specified by:
      assignTraceInfo in interface Node
    • acceptPropagatedTraceInfo

      public void acceptPropagatedTraceInfo(TraceInfo traceInfo)
      Description copied from interface: Node
      accepts traceability info propagated to this node
      Specified by:
      acceptPropagatedTraceInfo in interface Node
    • getTraceInfoPatternsEnumerated

      protected String getTraceInfoPatternsEnumerated()
      Descendants should use this in e.g. logging