org.objectweb.medor.expression.api

Interface Operand

All Superinterfaces:
org.objectweb.medor.clone.api.Cloneable, Expression, Serializable
Known Subinterfaces:
CalculatedParameterOperand, ParameterOperand, VariableOperand
Known Implementing Classes:
BasicOperand, BasicParameterOperand, BasicVariableOperand

public interface Operand
extends Expression

This interface represents a byte, char, int,...or an object value.

When of primitive type, widing conversions allowed by the Java programming language are used to get the value in different types.

Each getXXX() method returns the operand value of the XXX type.

Method Summary

BigDecimal
getBigDecimal()
evalute the expression result and return a BigDecimal value
BigInteger
getBigInteger()
evalute the expression result and return a BigInteger value
boolean
getBoolean()
get the operand result as a boolean value
byte
getByte()
get the operand result as a byte value
byte[]
getByteArray()
get the operand result as a byte[] value
char
getChar()
get the operand result as a char value
char[]
getCharArray()
get the operand result as a char[] value
Date
getDate()
get the operand result a java.util.Date value
double
getDouble()
get the operand result as a double value
float
getFloat()
get the operand result as a float value
int
getInt()
get the operand result as a byte value
long
getLong()
get the operand result as a long value
Object
getObject()
get the operand result as a java.lang.Object value
short
getShort()
get the operand result as a short value
String
getString()
evalute the expression result and return a string value
boolean
isDefined()
Indicates if the operand has been defined, ie is the value returned if pertinent
void
setIsDefined(boolean isdefined)

Methods inherited from interface org.objectweb.medor.clone.api.Cloneable

clone

Methods inherited from interface org.objectweb.medor.expression.api.Expression

compileExpression, evaluate, getType

Method Details

getBigDecimal

public BigDecimal getBigDecimal()
            throws TypingException
evalute the expression result and return a BigDecimal value

Returns:
BigDecimal result

Throws:
TypingException - if it is impossible to return a string value


getBigInteger

public BigInteger getBigInteger()
            throws TypingException
evalute the expression result and return a BigInteger value

Returns:
BigInteger result

Throws:
TypingException - if it is impossible to return a string value


getBoolean

public boolean getBoolean()
            throws TypingException
get the operand result as a boolean value

Returns:
a boolean value

Throws:
TypingException - if it is impossible to return a boolean value


getByte

public byte getByte()
            throws TypingException
get the operand result as a byte value

Returns:
a byte value

Throws:
TypingException - if it is impossible to return an int value


getByteArray

public byte[] getByteArray()
            throws TypingException
get the operand result as a byte[] value

Returns:
a byte[] value

Throws:
TypingException - if it is impossible to return an int value


getChar

public char getChar()
            throws TypingException
get the operand result as a char value

Returns:
a char value

Throws:
TypingException - if it is impossible to return a char value;


getCharArray

public char[] getCharArray()
            throws TypingException
get the operand result as a char[] value

Returns:
a char[] value

Throws:
TypingException - if it is impossible to return a char value;


getDate

public Date getDate()
            throws TypingException
get the operand result a java.util.Date value

Returns:
a date value

Throws:
TypingException - if it is impossible to return java.util.Date


getDouble

public double getDouble()
            throws TypingException
get the operand result as a double value

Returns:
a double value

Throws:
TypingException - if it is impossible to return a double value


getFloat

public float getFloat()
            throws TypingException
get the operand result as a float value

Returns:
a float value

Throws:
TypingException - if it is impossible to return a float value;


getInt

public int getInt()
            throws TypingException
get the operand result as a byte value

Returns:
an int value

Throws:
TypingException - if it is impossible to return an int value


getLong

public long getLong()
            throws TypingException
get the operand result as a long value

Returns:
a long value

Throws:
TypingException - if it is impossible to return a long value


getObject

public Object getObject()
get the operand result as a java.lang.Object value

Returns:
an object


getShort

public short getShort()
            throws TypingException
get the operand result as a short value

Returns:
a short value

Throws:
TypingException - if it is impossible to return a short value


getString

public String getString()
            throws TypingException
evalute the expression result and return a string value

Returns:
string result

Throws:
TypingException - if it is impossible to return a string value


isDefined

public boolean isDefined()
Indicates if the operand has been defined, ie is the value returned if pertinent


setIsDefined

public void setIsDefined(boolean isdefined)