Package com.walkfares.odsl.var.basic
Class VarScalar
java.lang.Object
com.walkfares.odsl.var.BaseVar
com.walkfares.odsl.var.basic.VarScalar
- All Implemented Interfaces:
Var
- Direct Known Subclasses:
VarMessage
,VarMissingValue
,VarSetting
public class VarScalar extends BaseVar implements Var
-
Field Summary
-
Constructor Summary
Constructors Constructor Description VarScalar()
VarScalar(double value)
VarScalar(String value)
VarScalar(String value, boolean keepAsString)
VarScalar(String id, double value)
VarScalar(String id, double value, String description)
VarScalar(String id, String value)
VarScalar(String id, String value, String description)
-
Method Summary
Modifier and Type Method Description Var
_clone()
Var
applyChanges(Var update)
static VarScalar
DOUBLE(double val)
boolean
equals(Object obj)
String
getDescription()
double
getDoubleValue()
String
getId()
int
getIntValue()
long
getLongValue()
Number
getNumber()
BigDecimal
getPreciseNumber()
Precision
getPrecision()
String
getSource()
VarType
getType()
String
getValue()
boolean
isBoolean()
boolean
isDouble()
boolean
isEmpty()
boolean
isInteger()
boolean
isKeepAsString()
boolean
isMissing()
boolean
isNumeric()
boolean
isTrue()
boolean
isZero()
Var
set_Id(String id)
VarScalar
setDescription(String description)
VarScalar
setKeepAsString(boolean keepAsString)
VarScalar
setPrecision(Precision precision)
VarScalar
setSource(String source)
void
setValue(double v)
void
setValue(int v)
void
setValue(long v)
void
setValue(Var val)
void
setValue(String s)
String
toString()
Object
tryConvert(Parameter p)
Methods inherited from class com.walkfares.odsl.var.BaseVar
add, getLinks, getTypeName, getUID, setLinks
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.walkfares.odsl.var.Var
DATE, DATE_NULL, DYNAMIC, getReference, getTypeName, getUID, LIST, SCALAR, setId
-
Field Details
-
Constructor Details
-
Method Details
-
DOUBLE
-
getId
-
set_Id
-
getType
-
getValue
-
getIntValue
public int getIntValue() -
getLongValue
public long getLongValue() -
getDoubleValue
public double getDoubleValue() -
getNumber
-
isTrue
public boolean isTrue() -
isBoolean
public boolean isBoolean() -
isInteger
public boolean isInteger() -
isDouble
public boolean isDouble() -
isNumeric
public boolean isNumeric() -
setValue
-
setValue
public void setValue(int v) -
setValue
public void setValue(double v) -
setValue
public void setValue(long v) -
setValue
-
getSource
-
setSource
-
getDescription
-
setDescription
-
isKeepAsString
public boolean isKeepAsString() -
setKeepAsString
-
_clone
-
applyChanges
- Specified by:
applyChanges
in interfaceVar
- Overrides:
applyChanges
in classBaseVar
-
toString
-
getPreciseNumber
-
equals
-
tryConvert
- Specified by:
tryConvert
in interfaceVar
- Overrides:
tryConvert
in classBaseVar
-
isMissing
public boolean isMissing() -
isZero
public boolean isZero() -
getPrecision
-
setPrecision
-
isEmpty
public boolean isEmpty()
-