public static class CalculatorExpr.Value
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private boolean |
boolVal |
private double |
doubleVal |
(package private) CalculatorExpr.ExpressionType |
etype
The expression type to check the second operand.
|
private float |
floatVal |
private int |
intVal |
private long |
longVal |
private java.lang.Object |
oVal |
private java.lang.CharSequence |
stringVal |
protected char |
type_
Type of the value.
|
Constructor and Description |
---|
Value() |
Value(java.lang.Appendable val) |
Value(boolean val) |
Value(char val) |
Value(double val) |
Value(float val) |
Value(int val) |
Value(long val) |
Value(java.lang.Object val) |
Value(java.lang.String val) |
Modifier and Type | Method and Description |
---|---|
boolean |
booleanValue()
Returns a boolean value.
|
void |
copy(CalculatorExpr.Value src)
Copy all content from src to this.
|
double |
doubleValue() |
float |
floatValue() |
int |
intValue() |
boolean |
isObjValue()
Returns true if the value stores an Object value.
|
long |
longValue() |
java.lang.Object |
objValue()
Converts the Value to the adequate Object representation, especially for the wrapped
primitive types.
|
java.lang.CharSequence |
stringValue()
Returns the reference to the StringBuilder-buffer if the result is a concatenation of strings.
|
java.lang.String |
stringxValue() |
void |
toNumValue()
Converts the content of the variable to a numeric one.
|
java.lang.String |
toString() |
char |
type() |
protected char type_
Class.getName()
CalculatorExpr.ExpressionType etype
type()
is identically with CalculatorExpr.ExpressionType.typeChar()
.
It need not checked outside of the internally functionality of the outer class CalculatorExpr.private long longVal
private int intVal
private double doubleVal
private float floatVal
private boolean boolVal
private java.lang.CharSequence stringVal
private java.lang.Object oVal
public Value(long val)
public Value(int val)
public Value(double val)
public Value(float val)
public Value(boolean val)
public Value(char val)
public Value(java.lang.String val)
public Value(java.lang.Appendable val)
public Value(java.lang.Object val)
public Value()
public char type()
public void copy(CalculatorExpr.Value src)
src
- public boolean booleanValue()
public int intValue()
public long longValue()
public double doubleValue()
public float floatValue()
public java.lang.CharSequence stringValue()
public java.lang.Object objValue()
CharSequence
, this instance is returned. It may be a
String
or a StringBuilder
.
If the value contains a reference to an object because the expression consists of only one
argument, a CalculatorExpr.Operation.datapath()
of an DataAccess
, this Object is returned.public boolean isObjValue()
type_
== 'o'.public java.lang.String stringxValue()
public void toNumValue()
public java.lang.String toString()
toString
in class java.lang.Object