org.drools.rule
Class Declaration

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

public class Declaration
extends Object
implements Serializable, Comparable

A typed, named variable for Condition evaluation.

Author:
bob mcwhirter , Simon Harris
See Also:
ObjectType, Condition, Serialized Form

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

Constructor Detail

Declaration

Declaration(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 String getIdentifier()
Retrieve the variable's identifier.

Returns:
The variable's identifier.

getIndex

public int getIndex()

compareTo

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

toString

public String toString()
Overrides:
toString in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object object)
Overrides:
equals in class Object


Copyright © 2001-2005 The Codehaus. All Rights Reserved.