org.ujac.util.exi
Class ExpressionTuple

java.lang.Object
  extended by org.ujac.util.exi.Operand
      extended by org.ujac.util.exi.ExpressionTuple
All Implemented Interfaces:
Serializable, Cloneable

public class ExpressionTuple
extends Operand

Title: ExpressionTuple
Description: A class holding expression tuples: object, operation and operand.

Author:
lauerc
See Also:
Serialized Form

Constructor Summary
ExpressionTuple()
          Default constructor for ExpressionTuple.
ExpressionTuple(char[] source, int absolutePosition, int relativePosition, int length)
          Constructs an ExpressionTuple instance with specific arguments.
ExpressionTuple(ExpressionTuple outer)
          Constructs an ExpressionTuple instance with specific arguments.
 
Method Summary
 Object clone()
           
 Operand getObject()
          Returns the object.
 Operand getOperand()
          Returns the operand.
 Operation getOperation()
          Returns the operation.
 Object getResult()
          Returns the result.
 Object getValue()
          Gets the operand value.
 boolean isExplitelyEncapsulated()
          Gets the explitelyEncapsulated flag.
 boolean isSimple()
          Tells whether the operand is a simple one or not.
 void setExplitelyEncapsulated(boolean explitelyEncapsulated)
          Sets the explitelyEncapsulated flag.
 void setObject(Operand object)
          Sets the object.
 void setOperand(Operand operand)
          Sets the operand.
 void setOperation(Operation operation)
          Sets the operation.
 void setResult(Object result)
          Sets the result.
 String toString()
          Converts expression tuple to String.
 
Methods inherited from class org.ujac.util.exi.Operand
getAbsolutePosition, getCode, getForcedType, getLength, getRelativePosition, getSource, getTotalLength, getTotalPosition, setAbsolutePosition, setForcedType, setLength, setRelativePosition, setSource, setTotalLength, setTotalPosition
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ExpressionTuple

public ExpressionTuple()
Default constructor for ExpressionTuple.


ExpressionTuple

public ExpressionTuple(char[] source,
                       int absolutePosition,
                       int relativePosition,
                       int length)
Constructs an ExpressionTuple instance with specific arguments.

Parameters:
source - The textual source for the expression.
absolutePosition - The absolute start position of the expression within the source.
relativePosition - The relative start position of the expression within the source.
length - The length of the expression.

ExpressionTuple

public ExpressionTuple(ExpressionTuple outer)
Constructs an ExpressionTuple instance with specific arguments. Copies the source, totalPosition and totalLength from the outer expression.

Parameters:
outer - The outer expression.
Method Detail

isSimple

public boolean isSimple()
Description copied from class: Operand
Tells whether the operand is a simple one or not.

Specified by:
isSimple in class Operand
Returns:
true if the operand is instance of class VariableOperand else false.
See Also:
Operand.isSimple()

getObject

public Operand getObject()
Returns the object.

Returns:
The object to call.

setObject

public void setObject(Operand object)
Sets the object.

Parameters:
object - The object to set

getOperand

public Operand getOperand()
Returns the operand.

Returns:
The operand to use for the call.

setOperand

public void setOperand(Operand operand)
Sets the operand.

Parameters:
operand - The operand to set

isExplitelyEncapsulated

public boolean isExplitelyEncapsulated()
Gets the explitelyEncapsulated flag.

Returns:
The current value of the explitelyEncapsulated flag.

setExplitelyEncapsulated

public void setExplitelyEncapsulated(boolean explitelyEncapsulated)
Sets the explitelyEncapsulated flag.

Parameters:
explitelyEncapsulated - The value for the explitelyEncapsulated flag to set.

getOperation

public Operation getOperation()
Returns the operation.

Returns:
The operation to execute.

setOperation

public void setOperation(Operation operation)
Sets the operation.

Parameters:
operation - The operation to set

getResult

public Object getResult()
Returns the result.

Returns:
Object

setResult

public void setResult(Object result)
Sets the result.

Parameters:
result - The result to set

getValue

public Object getValue()
Gets the operand value.

Specified by:
getValue in class Operand
Returns:
the value of the operand.

toString

public String toString()
Converts expression tuple to String.

Overrides:
toString in class Object
Returns:
The objects content as a String.

clone

public Object clone()
Overrides:
clone in class Operand
See Also:
Object.clone()


Copyright © 2003-2004 UJAC.org. All Rights Reserved.