jeops.rete
Class JoinReteNode
java.lang.Object
|
+--jeops.rete.ReteNode
|
+--jeops.rete.JoinReteNode
- public class JoinReteNode
- extends ReteNode
A node in the Rete network that has more than one input, so that
objects coming from distinct parts of the network are joined
together in instances of this class.
- Version:
- 1.0 14 Jul 2000
- Author:
- Carlos Figueira Filho (csff@cin.ufpe.br)
Field Summary |
private java.lang.Object[] |
ARRAY
Object array, defined as an attribute for efficiency purposes
only. |
private int |
declIndex
|
private java.util.Iterator[] |
its
Iterator array, defined as an attribute for efficiency purposes
only. |
private AbstractRuleBase |
ruleBase
The rule base used to check the validity of the property of the
incoming objects. |
private int |
ruleIndex
The index of the rule that contains the condition to be checked
by this node. |
private java.util.List[] |
waitingObjects
The objects that are "waiting" at some inputs of this node for
the arrival of objects in other inputs, in order to be
propagated at this node. |
Method Summary |
void |
flush()
Remove all objects that may be stored in this node. |
void |
newObject(java.lang.Object obj,
int input)
Informs this node that an object has arrived. |
void |
remove(java.lang.Object obj)
Remove the given object from the memory of this node. |
java.lang.String |
toString()
Returns a string representation of this object. |
Methods inherited from class java.lang.Object |
,
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
registerNatives,
wait,
wait,
wait |
waitingObjects
private java.util.List[] waitingObjects
- The objects that are "waiting" at some inputs of this node for
the arrival of objects in other inputs, in order to be
propagated at this node. It's actually a list of lists, where
for every input of this node there is a list of the objects
entered by that input.
ruleBase
private AbstractRuleBase ruleBase
- The rule base used to check the validity of the property of the
incoming objects.
ruleIndex
private int ruleIndex
- The index of the rule that contains the condition to be checked
by this node.
declIndex
private int declIndex
ARRAY
private final java.lang.Object[] ARRAY
- Object array, defined as an attribute for efficiency purposes
only.
its
private final java.util.Iterator[] its
- Iterator array, defined as an attribute for efficiency purposes
only.
JoinReteNode
public JoinReteNode(int numberInputs,
AbstractRuleBase ruleBase,
int ruleIndex,
int declIndex)
- Class constructor.
- Parameters:
numberInputs
- the number of inputs of this node.ruleBase
- the rule base used to check if this node can be
activated.ruleIndex
- the index of the rule that contains the
condition to be checked by this node.declIndex
- the index of the declaration being joined by
this node.
flush
public void flush()
- Remove all objects that may be stored in this node.
newObject
public void newObject(java.lang.Object obj,
int input)
- Informs this node that an object has arrived.
- Overrides:
- newObject in class ReteNode
- Parameters:
obj
- the object that arrived at this node.input
- the input number of this node that is to receive
the object.
remove
public void remove(java.lang.Object obj)
- Remove the given object from the memory of this node.
- Parameters:
obj
- the object to be removed.
toString
public java.lang.String toString()
- Returns a string representation of this object. Useful for
debugging.
- Overrides:
- toString in class java.lang.Object
- Returns:
- a string representation of this object.