org.jscience.computing.ai.expertsystem.conflict
Class ConflictSetElement

java.lang.Object
  extended by org.jscience.computing.ai.expertsystem.conflict.ConflictSetElement

public class ConflictSetElement
extends java.lang.Object

An element present in the conflict set.


Constructor Summary
ConflictSetElement(int ruleIndex, java.lang.Object[] objects)
          Class constructor.
 
Method Summary
 boolean equals(java.lang.Object obj)
          Compares this object with the given one.
 java.lang.Object[] getObjects()
          Returns the objects bound to the declared variables.
 int getRuleIndex()
          Returns the index of the fireable rule.
 long getTimestamp()
          Returns the timestamp of this element.
 int hashCode()
          Returns a hash code for this object.
 boolean isDeclared(java.lang.Object obj)
          Checks whether a given object is one of the objects bound to the declared variables in this element.
 java.lang.String toString()
          Returns a string representation of this object.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ConflictSetElement

public ConflictSetElement(int ruleIndex,
                          java.lang.Object[] objects)
Class constructor.

Parameters:
ruleIndex - the index of the fireable rule.
objects - the objects bound to the declared variables.
Method Detail

equals

public boolean equals(java.lang.Object obj)
Compares this object with the given one.

Overrides:
equals in class java.lang.Object
Parameters:
obj - the object to be compared
Returns:
true if the two objects represent the same conflict set element; false otherwise.

getObjects

public java.lang.Object[] getObjects()
Returns the objects bound to the declared variables.

Returns:
the objects bound to the declared variables.

getRuleIndex

public int getRuleIndex()
Returns the index of the fireable rule.

Returns:
the index of the fireable rule.

getTimestamp

public long getTimestamp()
Returns the timestamp of this element.

Returns:
the timestamp of this element.

hashCode

public int hashCode()
Returns a hash code for this object.

Overrides:
hashCode in class java.lang.Object
Returns:
a hash code for this object.

isDeclared

public boolean isDeclared(java.lang.Object obj)
Checks whether a given object is one of the objects bound to the declared variables in this element.

Parameters:
obj - the object to be checked.
Returns:
true if the given object bound to one of the declared variables in this element; false otherwise.

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.