Variable Class

com.bea.p13n.expression.operator
Variable Class

public final class Variable

    extends Operator
    implements Comparable

Implementation of the Variable operator. The variable operator defines a place-holder for a variable that will be substituted during unification.
Input 1: A String (or Expression returning a String) that is the name of the variable.
Input 2: A Class (or Expression returning a Class) that is the type of the variable.


Hierarchy
Object
  ComplexExpressionImpl
    Operator
      Variable
All Implemented Interfaces

Cloneable, Comparable, Expression, Serializable

Constructor Summary

Variable()

A default Class Constructor.
Variable(String name, Class type)

A class constructor that constructs a variable by assigning a name and a class type.
 

Method Summary

public int
compareTo(Object object)
public Class
getClassType()
Returns the class type of the value contained in this.
public String
getName()
Returns the name of this.
public Class[]
getParameterSignature()
Returns the parameter signature of this
public Object
getValue()
Returns the value stored in this.
public boolean
isBound()
protected boolean
isEqualitySubExpression(int index)
public void
setValue(Object object)
Stores the given value in this.
 
Methods from  com.bea.p13n.expression.operator.Operator
leftHandSide, operand, rightHandSide
 
Methods from  com.bea.p13n.expression.internal.ComplexExpressionImpl
addListener, addSubExpression, clearCache, clone, createProxyExpression, equals, getCachedValue, getParent, getSource, getSubExpression, getSubExpressionCount, getUserData, hashCode, isCached, isCacheEnabled, notifyListeners, removeAllSubExpressions, removeListener, removeSubExpression, removeSubExpression, setCachedValue, setCacheEnabled, setParent, setSource, setSubExpression, setUserData, toString, write
 
Methods from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
   
Methods from interface java.lang.Comparable
compareTo
 
Methods from interface com.bea.p13n.expression.Expression
accept, addListener, addSubExpression, clearCache, clone, getCachedValue, getParameterSignature, getParent, getSource, getSubExpression, getSubExpressionCount, getUserData, isCached, isCacheEnabled, removeAllSubExpressions, removeListener, removeSubExpression, removeSubExpression, setCachedValue, setCacheEnabled, setSource, setSubExpression, setUserData, write
 

Constructor Detail

Variable

public Variable()
A default Class Constructor.

Variable

public Variable(String name, 
                Class type)
A class constructor that constructs a variable by assigning a name and a class type.
 

Method Detail

compareTo(Object) Method

public int compareTo(Object object)
throws ClassCastException

Exceptions

ClassCastException

getClassType() Method

public Class getClassType()
Returns the class type of the value contained in this.

Returns

The class type of value contained in this.

getName() Method

public String getName()
Returns the name of this.

Returns

The name of this.

getParameterSignature() Method

public Class[] getParameterSignature()
Returns the parameter signature of this

Returns

An array of Class that has parameter signature.

getValue() Method

public Object getValue()
Returns the value stored in this.

Returns

The value stored in this variable.

isBound() Method

public boolean isBound()

Returns

true If this is bound to a value otherwise false.

isEqualitySubExpression(int) Method

protected boolean isEqualitySubExpression(int index)
Overrides
ComplexExpressionImpl.isEqualitySubExpression(int)

setValue(Object) Method

public void setValue(Object object)
Stores the given value in this.

Parameters

object
The value to be stored.