|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--jeops.rete.ReteNode
A node in the Rete network. This class is the base for all kinds of nodes that exist in the implementation of the Rete network for JEOPS.
Field Summary | |
private int |
numberInputs
The number of inputs of this node. |
private int |
numberOutputs
The number of outputs of this node. |
private java.util.List |
successors
The nodes that succede this one. |
Constructor Summary | |
ReteNode(int numberInputs,
int numberOutputs)
Creates a new rete node. |
Method Summary | |
void |
addSuccessor(int input,
ReteNode succNode,
int succInput)
Adds a connection from some input of this node to a given input of the given node. |
void |
addSuccessor(ReteNode succNode)
Adds a connection from the only input of this node to the only input of the given node. |
void |
addSuccessor(ReteNode succNode,
int succIndex)
Adds a connection from the only input of this node to a given input of the given node. |
int |
getNumberInputs()
Returns the number of inputs of this node. |
int |
getNumberOutputs()
Returns the number of outputs of this node. |
protected java.util.List |
getSuccessors()
Returns the successors of this node. |
abstract void |
newObject(java.lang.Object obj,
int input)
Informs this node that an object has arrived. |
protected void |
propagate(java.lang.Object obj,
int input)
Propagates the objects from this node to the successors. |
Methods inherited from class java.lang.Object |
|
Field Detail |
private java.util.List successors
private int numberInputs
private int numberOutputs
Constructor Detail |
public ReteNode(int numberInputs, int numberOutputs)
numberInputs
- the number of inputs of this node.numberOutputs
- the number of inputs of this node.Method Detail |
public void addSuccessor(int input, ReteNode succNode, int succInput)
input
- the input of this node that is being connected to
the given input of the successor node.succNode
- the successor to be added to this node.succInput
- the input in the successor node to where the
propagated objects must be sent.public void addSuccessor(ReteNode succNode)
succNode
- the successor to be added to this node.public void addSuccessor(ReteNode succNode, int succIndex)
succNode
- the successor to be added to this node.succInput
- the input in the successor node to where the
propagated objects must be sent.public int getNumberInputs()
public int getNumberOutputs()
protected java.util.List getSuccessors()
public abstract void newObject(java.lang.Object obj, int input)
obj
- the object that arrived at this node.input
- the input number of this node that is to receive
the object.protected void propagate(java.lang.Object obj, int input)
obj
- the object to be propagated.input
- the input from which the object entered.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |