org.jactr.core.slot
Class DefaultConditionalSlot

java.lang.Object
  extended by org.jactr.core.slot.BasicSlot
      extended by org.jactr.core.slot.DefaultMutableSlot
          extended by org.jactr.core.slot.DefaultConditionalSlot
All Implemented Interfaces:
java.lang.Cloneable, java.lang.Comparable<ISlot>, IConditionalSlot, IMutableSlot, ISlot
Direct Known Subclasses:
DefaultVariableConditionalSlot

public class DefaultConditionalSlot
extends DefaultMutableSlot
implements IConditionalSlot

Author:
harrison TODO To change the template for this generated type comment go to Window - Preferences - Java - Code Style - Code Templates

Field Summary
static double EPSILON
           
 
Fields inherited from interface org.jactr.core.slot.IConditionalSlot
EQUALS, GREATER_THAN, GREATER_THAN_EQUALS, LESS_THAN, LESS_THAN_EQUALS, NOT_EQUALS, WITHIN
 
Constructor Summary
DefaultConditionalSlot(ISlot slot)
           
DefaultConditionalSlot(java.lang.String name, int condition, java.lang.Object value)
           
DefaultConditionalSlot(java.lang.String name, java.lang.Object value)
           
 
Method Summary
 DefaultConditionalSlot clone()
           
 boolean equals(java.lang.Object obj)
           
 boolean equalValues(java.lang.Object value)
           
 int getCondition()
           
 int hashCode()
          value is intentionally excluded since we dont want the hash to change..
 boolean matchesCondition(java.lang.Object test)
          test the value to see if it satisfies the condition specified by this conditional slot
 void setCondition(int condition)
           
 
Methods inherited from class org.jactr.core.slot.DefaultMutableSlot
setValue
 
Methods inherited from class org.jactr.core.slot.BasicSlot
compareTo, getName, getValue, isVariable, isVariableValue, setOwner, toString
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.jactr.core.slot.IMutableSlot
setValue
 
Methods inherited from interface org.jactr.core.slot.ISlot
getName, getValue, isVariable, isVariableValue
 

Field Detail

EPSILON

public static final double EPSILON
See Also:
Constant Field Values
Constructor Detail

DefaultConditionalSlot

public DefaultConditionalSlot(java.lang.String name,
                              java.lang.Object value)
Parameters:
name -
value -

DefaultConditionalSlot

public DefaultConditionalSlot(java.lang.String name,
                              int condition,
                              java.lang.Object value)

DefaultConditionalSlot

public DefaultConditionalSlot(ISlot slot)
Method Detail

clone

public DefaultConditionalSlot clone()
Overrides:
clone in class DefaultMutableSlot
See Also:
org.jactr.core.utils.Duplicateable#duplicate()

getCondition

public int getCondition()
Specified by:
getCondition in interface IConditionalSlot
See Also:
IConditionalSlot.getCondition()

setCondition

public void setCondition(int condition)
Specified by:
setCondition in interface IConditionalSlot
See Also:
IConditionalSlot.setCondition(int)

matchesCondition

public boolean matchesCondition(java.lang.Object test)
Description copied from interface: IConditionalSlot
test the value to see if it satisfies the condition specified by this conditional slot

Specified by:
matchesCondition in interface IConditionalSlot
Returns:

equalValues

public boolean equalValues(java.lang.Object value)
Specified by:
equalValues in interface ISlot
Overrides:
equalValues in class BasicSlot
See Also:
ISlot.equalValues(java.lang.Object)

hashCode

public int hashCode()
Description copied from class: DefaultMutableSlot
value is intentionally excluded since we dont want the hash to change..

Overrides:
hashCode in class DefaultMutableSlot

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class DefaultMutableSlot