Class BaseNode
- java.lang.Object
-
- org.eclipse.viatra.query.runtime.rete.network.BaseNode
-
- All Implemented Interfaces:
Node
- Direct Known Subclasses:
SimpleReceiver,StandardIndexer,StandardNode
public abstract class BaseNode extends java.lang.Object implements Node
Base implementation for a Rete node.
-
-
Field Summary
Fields Modifier and Type Field Description protected longnodeIdprotected ReteContainerreteContainerprotected java.lang.Objecttagprotected java.util.Set<TraceInfo>traceInfos
-
Constructor Summary
Constructors Constructor Description BaseNode(ReteContainer reteContainer)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidacceptPropagatedTraceInfo(TraceInfo traceInfo)accepts traceability info propagated to this nodevoidassignTraceInfo(TraceInfo traceInfo)assigns new traceability info to this nodeReteContainergetContainer()longgetNodeId()java.lang.ObjectgetTag()protected java.lang.StringgetTraceInfoPatternsEnumerated()Descendants should use this in e.g.java.util.Set<TraceInfo>getTraceInfos()voidsetTag(java.lang.Object tag)Assigns a descriptive tag to the nodejava.lang.StringtoString()protected java.lang.StringtoStringCore()clients should override this to append before the tag / trace indicators-
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.Node
getCommunicationTracker
-
-
-
-
Field Detail
-
reteContainer
protected ReteContainer reteContainer
-
nodeId
protected long nodeId
-
tag
protected java.lang.Object tag
-
traceInfos
protected java.util.Set<TraceInfo> traceInfos
-
-
Constructor Detail
-
BaseNode
public BaseNode(ReteContainer reteContainer)
- Parameters:
reteContainer- the container to create this node in
-
-
Method Detail
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
toStringCore
protected java.lang.String toStringCore()
clients should override this to append before the tag / trace indicators
-
getContainer
public ReteContainer getContainer()
- Specified by:
getContainerin interfaceNode- Returns:
- the network this node belongs to.
-
getNodeId
public long getNodeId()
-
getTag
public java.lang.Object getTag()
-
setTag
public void setTag(java.lang.Object tag)
Description copied from interface:NodeAssigns a descriptive tag to the node
-
getTraceInfos
public java.util.Set<TraceInfo> getTraceInfos()
- Specified by:
getTraceInfosin interfaceNode- Returns:
- unmodifiable view of the list of traceability infos assigned to this node
-
assignTraceInfo
public void assignTraceInfo(TraceInfo traceInfo)
Description copied from interface:Nodeassigns new traceability info to this node- Specified by:
assignTraceInfoin interfaceNode
-
acceptPropagatedTraceInfo
public void acceptPropagatedTraceInfo(TraceInfo traceInfo)
Description copied from interface:Nodeaccepts traceability info propagated to this node- Specified by:
acceptPropagatedTraceInfoin interfaceNode
-
getTraceInfoPatternsEnumerated
protected java.lang.String getTraceInfoPatternsEnumerated()
Descendants should use this in e.g. logging
-
-