public class RValue
extends java.lang.Object
operator
attribute.
During parsing, if a parent token has an RValue, then perform accumulator functionsModifier and Type | Class and Description |
---|---|
static class |
RValue.Type |
Modifier and Type | Field and Description |
---|---|
static int |
OPERATOR_CONCAT |
static int |
OPERATOR_DIVIDE |
static int |
OPERATOR_EQUAL |
static int |
OPERATOR_GT |
static int |
OPERATOR_GTE |
static int |
OPERATOR_LT |
static int |
OPERATOR_LTE |
static int |
OPERATOR_MINUS |
static int |
OPERATOR_MULTIPLY |
static int |
OPERATOR_NONE |
static int |
OPERATOR_NOT |
static int |
OPERATOR_NOT_EQUAL |
static int |
OPERATOR_PLUS |
Constructor and Description |
---|
RValue()
bean constructor
|
RValue(double numeric)
Convenience constructor to set this RValue to this numeric value
|
RValue(double x,
double y,
double z)
Convenience constructor to create a vector out of 3 doubles
|
RValue(RValue.Type type)
Convenience constructor to set the Type of this RValue
|
RValue(java.lang.String string)
Convenience constructor to set this RValue to this String
|
Modifier and Type | Method and Description |
---|---|
int |
getDimensions()
Return the number of dimensions in this RValue.
|
double |
getNumeric() |
int |
getOperator() |
java.lang.String |
getString() |
RValue.Type |
getType() |
double[] |
getVector() |
double |
getVector(int index) |
double |
getVector(java.lang.String s) |
static boolean |
isValidVectorAccess(java.lang.String s)
Is this vector access string one we know about?
|
void |
setNumeric(double numeric) |
void |
setOperator(int operator) |
void |
setString(java.lang.String string) |
void |
setType(RValue.Type type) |
void |
setVector(int index,
double value) |
java.lang.String |
toString() |
public static final int OPERATOR_NONE
public static final int OPERATOR_PLUS
public static final int OPERATOR_MINUS
public static final int OPERATOR_MULTIPLY
public static final int OPERATOR_DIVIDE
public static final int OPERATOR_CONCAT
public static final int OPERATOR_LT
public static final int OPERATOR_LTE
public static final int OPERATOR_GT
public static final int OPERATOR_GTE
public static final int OPERATOR_EQUAL
public static final int OPERATOR_NOT_EQUAL
public static final int OPERATOR_NOT
public RValue()
public RValue(RValue.Type type)
type
- The Type of this RValuepublic RValue(java.lang.String string)
string
- The String to setpublic RValue(double numeric)
numeric
- The double value to setpublic RValue(double x, double y, double z)
x
- The 0th parametery
- The 1st parameterz
- The 2nd parameterpublic RValue.Type getType()
public void setType(RValue.Type type)
type
- the type to setpublic double getNumeric()
public void setNumeric(double numeric)
numeric
- the numeric to setpublic java.lang.String getString()
public void setString(java.lang.String string)
string
- the string to setpublic int getOperator()
public void setOperator(int operator)
operator
- the operator to setpublic void setVector(int index, double value)
public double getVector(int index)
public double[] getVector()
public double getVector(java.lang.String s)
public static boolean isValidVectorAccess(java.lang.String s)
s
- The possible extension to checkpublic int getDimensions()
public java.lang.String toString()
toString
in class java.lang.Object