Overview | Package | Class | Tree | Deprecated | Index | Help
| © 2003 BEA Systems, Inc.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.bea.p13n.expression.operator
Class Variable

    java.lang.Object
      |
      +--com.bea.p13n.expression.internal.ComplexExpressionImpl
            |
            +--com.bea.p13n.expression.operator.Operator
                  |
                  +--com.bea.p13n.expression.operator.Variable

All Implemented Interfaces:
  Cloneable, Comparable, Expression, ExpressionEvents, Serializable

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.

See Also:
  Serialized Form

Field Summary

Fields inherited from interface com.bea.p13n.expression.ExpressionEvents
`EVENT_ADD_SUBEXPRESSION, EVENT_CLEAR_CACHE, EVENT_INTERNAL_MAX, EVENT_REMOVE_SUBEXPRESSION, EVENT_SET_CACHE_ENABLED, EVENT_SET_CACHED_VALUE, EVENT_SET_PARENT, EVENT_SET_SOURCE, EVENT_SET_SUBEXPRESSION, EVENT_SET_USER_DATA`

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
`int` | `compareTo(Object object)`
`Class` | `getClassType()` Returns the class type of the value contained in this.
`String` | `getName()` Returns the name of this.
`Class[]` | `getParameterSignature()` Returns the parameter signature of this
`Object` | `getValue()` Returns the value stored in this.
`boolean` | `isBound()`
`protected boolean` | `isEqualitySubExpression(int index)`
`void` | `setValue(Object object)` Stores the given value in this.

Methods inherited from class com.bea.p13n.expression.operator.Operator
`leftHandSide, operand, rightHandSide`

Methods inherited from class 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 inherited from class java.lang.Object
`finalize, getClass, notify, notifyAll, wait, wait, wait`

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.

Parameters:
  `name` - A name for naming the variable. The variable name should start with '?'. For example, "?variableName", "?name" are valid variable names.
  `type` - A class type of the value that this holds.

Method Detail

### getName

    public String getName()

  Returns the name of this.

  Returns:
    The name of this.

### getClassType

    public Class getClassType()

  Returns the class type of the value contained in this.

  Returns:
    The class type of value contained in this.

### getValue

    public Object getValue()

  Returns the value stored in this.

  Returns:
    The value stored in this variable.

### isBound

    public boolean isBound()

  Returns:
    `true` If this is bound to a value otherwise `false`.

### setValue

    public void setValue(Object object)

  Stores the given value in this.

  Parameters:
    `object` - The value to be stored.

### getParameterSignature

    public Class[] getParameterSignature()

  Returns the parameter signature of this

  Specified by:
    `getParameterSignature` in interface `Expression`
  Returns:
    An array of `Class` that has parameter signature.

### isEqualitySubExpression

    protected boolean isEqualitySubExpression(int index)

  Overrides:
    `isEqualitySubExpression` in class `com.bea.p13n.expression.internal.ComplexExpressionImpl`

### compareTo

    public int compareTo(Object object)
                  throws ClassCastException

  Specified by:
    `compareTo` in interface `Comparable`
    `ClassCastException`

Overview | Package | Class | Tree | Deprecated | Index | Help
| © 2003 BEA Systems, Inc.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2003 BEA Systems, Inc. All Rights Reserved