Class DecimalValue
- java.lang.Object
-
- de.tudresden.inf.lat.tabulas.datatype.DecimalValue
-
- All Implemented Interfaces:
PrimitiveTypeValue
,Serializable
,Comparable<PrimitiveTypeValue>
,scala.Equals
,scala.Product
public class DecimalValue extends Object implements PrimitiveTypeValue, scala.Product, Serializable
This models a decimal value.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description DecimalValue(BigDecimal number)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static DecimalValue
apply()
static DecimalValue
apply(String str)
Constructs a new decimal value using a string.int
compareTo(PrimitiveTypeValue other)
PrimitiveType
getType()
Returns the primitive typeBigDecimal
getValue()
boolean
isEmpty()
Tell whether this value represents an empty value.BigDecimal
number()
String
render()
Returns a string representing this value.scala.collection.immutable.Seq<String>
renderAsList()
Returns a list of strings representing this value.String
toString()
-
-
-
Constructor Detail
-
DecimalValue
public DecimalValue(BigDecimal number)
-
-
Method Detail
-
apply
public static DecimalValue apply()
-
apply
public static DecimalValue apply(String str)
Constructs a new decimal value using a string.- Parameters:
str
- string- Returns:
- (undocumented)
- Throws:
ParseException
-str
is not a valid representation of a decimal value.
-
number
public BigDecimal number()
-
getType
public PrimitiveType getType()
Description copied from interface:PrimitiveTypeValue
Returns the primitive type- Specified by:
getType
in interfacePrimitiveTypeValue
- Returns:
- the primitive type
-
isEmpty
public boolean isEmpty()
Description copied from interface:PrimitiveTypeValue
Tell whether this value represents an empty value.- Specified by:
isEmpty
in interfacePrimitiveTypeValue
- Returns:
true
if and only if this value represents an empty value
-
renderAsList
public scala.collection.immutable.Seq<String> renderAsList()
Description copied from interface:PrimitiveTypeValue
Returns a list of strings representing this value.- Specified by:
renderAsList
in interfacePrimitiveTypeValue
- Returns:
- a list of strings representing this value
-
render
public String render()
Description copied from interface:PrimitiveTypeValue
Returns a string representing this value.- Specified by:
render
in interfacePrimitiveTypeValue
- Returns:
- a string representing this value
-
compareTo
public int compareTo(PrimitiveTypeValue other)
- Specified by:
compareTo
in interfaceComparable<PrimitiveTypeValue>
-
getValue
public BigDecimal getValue()
-
-