org.drools.rule
Class Declaration

java.lang.Object
  extended by org.drools.rule.Declaration
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable

public class Declaration
extends java.lang.Object
implements java.io.Serializable, java.lang.Comparable

A typed, named variable for Condition evaluation.

See Also:
ObjectType, Condition, Serialized Form

Constructor Summary
Declaration(java.lang.String identifier, ObjectType objectType, int order)
          Construct.
 
Method Summary
 int compareTo(java.lang.Object object)
           
 boolean equals(java.lang.Object object)
           
 java.lang.String getIdentifier()
          Retrieve the variable's identifier.
 int getIndex()
           
 ObjectType getObjectType()
          Retrieve the ObjectType.
 int hashCode()
           
 void setObjectType(ObjectType objectType)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Declaration

public Declaration(java.lang.String identifier,
                   ObjectType objectType,
                   int order)
Construct.

Parameters:
identifier - The name of the variable.
objectType - The type of this variable declaration.
order - The index within a rule.
Method Detail

getObjectType

public ObjectType getObjectType()
Retrieve the ObjectType.

Returns:
The object-type.

setObjectType

public void setObjectType(ObjectType objectType)

getIdentifier

public java.lang.String getIdentifier()
Retrieve the variable's identifier.

Returns:
The variable's identifier.

getIndex

public int getIndex()

compareTo

public int compareTo(java.lang.Object object)
Specified by:
compareTo in interface java.lang.Comparable

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

hashCode

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

equals

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