org.drools.rule
Class Declaration

java.lang.Object
  |
  +--org.drools.rule.Declaration

public class Declaration
extends java.lang.Object

A typed, named variable for Condition evaluation.

Author:
bob mcwhirter
See Also:
ObjectType, Condition

Field Summary
static Declaration[] EMPTY_ARRAY
          Empty Declaraton array.
 
Constructor Summary
Declaration(ObjectType objectType, java.lang.String identifier)
          Construct.
Declaration(java.lang.String identifier)
          Construct.
 
Method Summary
 boolean equals(java.lang.Object thatObj)
           
 java.lang.String getIdentifier()
          Retrieve the variable's identifier.
 ObjectType getObjectType()
          Retrieve the ObjectType.
 int hashCode()
           
 void setObjectType(ObjectType objectType)
          Set the ObjectType.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

EMPTY_ARRAY

public static final Declaration[] EMPTY_ARRAY
Empty Declaraton array.

Constructor Detail

Declaration

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

Parameters:
objectType - The type of this variable declaration.
identifier - The name of the variable.

Declaration

public Declaration(java.lang.String identifier)
Construct.

Parameters:
identifier - The name of the variable.
Method Detail

setObjectType

public void setObjectType(ObjectType objectType)
Set the ObjectType.

Parameters:
objectType - The object-type.

getObjectType

public ObjectType getObjectType()
Retrieve the ObjectType.

Returns:
The object-type.

getIdentifier

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

Returns:
The variable's identifier.

equals

public boolean equals(java.lang.Object thatObj)
Overrides:
equals in class java.lang.Object
See Also:
Object

hashCode

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

toString

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