gov.nasa.arc.brahms.vm.data
Class ExpressionValue

java.lang.Object
  extended by gov.nasa.arc.brahms.vm.data.ExpressionValue

public class ExpressionValue
extends java.lang.Object

The ExpressionValue represents the resulting value for an expression located at the left or right hand side of a comparison.

Version:
$Revision: 1.4 $ $Date: 2009/11/23 22:13:33 $ $Author: rnado $
Author:
Ron van Hoof

Constructor Summary
ExpressionValue()
          Constructor, creates a new ExpressionValue.
ExpressionValue(java.lang.Object value, int type)
          Constructor, creates a new ExpressionValue specifying the resulting value after evaluating the expression.
 
Method Summary
 void addStatement(VMStatementCtx ctx)
          Add the specified statement context to the list of statements from which their right hand side values are used in evaluating the expression to come to the resulting value.
 boolean equals(java.lang.Object obj)
          Tests whether two ExpressionValue are equal
 java.util.LinkedList getStatements()
          Returns the statements from which the value was established
 java.lang.Object getValue()
          Returns the value for the expression
 int getValueType()
          Returns the value's type
 void setValue(java.lang.Object value)
          Sets the expression value
 void setValueType(int type)
          Sets the value's type
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExpressionValue

public ExpressionValue()
Constructor, creates a new ExpressionValue.


ExpressionValue

public ExpressionValue(java.lang.Object value,
                       int type)
Constructor, creates a new ExpressionValue specifying the resulting value after evaluating the expression.

Parameters:
value - the resulting value of the expression
type - the type of the value
See Also:
IConstants.INT, IConstants.BYTE, IConstants.SHORT, IConstants.INT, IConstants.LONG, IConstants.FLOAT, IConstants.DOUBLE, IConstants.BOOLEAN, IConstants.STRING, IConstants.SYMBOL, IConstants.UDT, IConstants.JAVA_TYPE, IConstants.UNKNOWN
Method Detail

getValue

public final java.lang.Object getValue()
Returns the value for the expression

Returns:
Object the expression value

setValue

public final void setValue(java.lang.Object value)
Sets the expression value

Parameters:
value - the expression value

getValueType

public final int getValueType()
Returns the value's type

Returns:
int the value type
See Also:
IConstants.INT, IConstants.CHAR, IConstants.BYTE, IConstants.SHORT, IConstants.LONG, IConstants.FLOAT, IConstants.DOUBLE, IConstants.BOOLEAN, IConstants.STRING, IConstants.SYMBOL, IConstants.UDT, IConstants.JAVA_TYPE, IConstants.UNKNOWN

setValueType

public final void setValueType(int type)
Sets the value's type

Parameters:
type - the value type
See Also:
IConstants.INT, IConstants.CHAR, IConstants.BYTE, IConstants.SHORT, IConstants.LONG, IConstants.FLOAT, IConstants.DOUBLE, IConstants.BOOLEAN, IConstants.STRING, IConstants.SYMBOL, IConstants.UDT, IConstants.JAVA_TYPE, IConstants.UNKNOWN

addStatement

public final void addStatement(VMStatementCtx ctx)
Add the specified statement context to the list of statements from which their right hand side values are used in evaluating the expression to come to the resulting value.

Parameters:
ctx - the VMStatementCtx to be added

getStatements

public final java.util.LinkedList getStatements()
Returns the statements from which the value was established

Returns:
LinkedList the statements from which the value was established, null if the value wasn't acquired from any statements.

equals

public final boolean equals(java.lang.Object obj)
Tests whether two ExpressionValue are equal

Overrides:
equals in class java.lang.Object
Parameters:
obj - the ExpressionValue to be tested with for equality
Returns:
true if the two expression values are equal, false otherwise


Copyright © 1997-2012 All Rights Reserved.