jess
Class Activation

java.lang.Object
  extended by jess.Activation
All Implemented Interfaces:
java.io.Serializable

public class Activation
extends java.lang.Object
implements java.io.Serializable

A list of facts that satisfy a rule. An activation contains enough info to bind a rule's variables. You might use this class if you're writing your own Strategy implementation, or in a JessListener implementation.

(C) 2007 Sandia National Laboratories

See Also:
Strategy, JessListener, Serialized Form

Method Summary
 boolean equals(java.lang.Object o)
          Compare this object to another Activation.
 Defrule getRule()
          Return the activated rule.
 int getSalience()
          Evaluate and return the current salience for the rule referenced in this activation.
 Token getToken()
          Get the Rete network Token that caused this Activation.
 int hashCode()
           
 boolean isInactive()
          Deprecated. This method always returns "false". There's no such thing as an "inactive" activation.
 java.lang.String toString()
          Produce a string representation of this Activation for use in debugging.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

getToken

public final Token getToken()
Get the Rete network Token that caused this Activation.

Returns:
The token.

getRule

public final Defrule getRule()
Return the activated rule.

Returns:
The rule.

isInactive

public boolean isInactive()
Deprecated. This method always returns "false". There's no such thing as an "inactive" activation.

Query if this activation has been cancelled, or false if it is valid.

Returns:
True if this activation has been cancelled.

getSalience

public int getSalience()
Evaluate and return the current salience for the rule referenced in this activation.

Returns:
The salience value.

equals

public boolean equals(java.lang.Object o)
Compare this object to another Activation.

Overrides:
equals in class java.lang.Object
Parameters:
o - The Activation to compare to.

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

toString

public java.lang.String toString()
Produce a string representation of this Activation for use in debugging.

Overrides:
toString in class java.lang.Object
Returns:
The string representation

© 2013 Sandia Corporation