EMPTY_ARRAY| Modifier and Type | Method and Description |
|---|---|
BigDecimal |
bigDecimalValue()
Gets the value of this Ion
decimal as a BigDecimal. |
IonDecimal |
clone()
Creates a copy of this value and all of its children.
|
Decimal |
decimalValue()
Gets the value of this Ion
decimal as a Decimal,
which extends BigDecimal with support for negative zeros. |
double |
doubleValue()
Gets the value of this Ion
decimal as a Java
double value. |
float |
floatValue()
Gets the value of this Ion
decimal as a Java
float value. |
void |
setValue(BigDecimal value)
Sets the value of this element.
|
void |
setValue(double value)
Sets the value of this element.
|
void |
setValue(float value)
Sets the value of this element.
|
void |
setValue(long value)
Sets the value of this element.
|
accept, addTypeAnnotation, clearTypeAnnotations, equals, getContainer, getFieldName, getFieldNameSymbol, getSymbolTable, getSystem, getType, getTypeAnnotations, getTypeAnnotationSymbols, hashCode, hasTypeAnnotation, isNullValue, isReadOnly, makeReadOnly, removeFromContainer, removeTypeAnnotation, setTypeAnnotations, setTypeAnnotationSymbols, topLevelValue, toPrettyString, toString, toString, writeTofloat floatValue()
throws NullValueException
decimal as a Java
float value.NullValueException - if this.isNullValue().double doubleValue()
throws NullValueException
decimal as a Java
double value.NullValueException - if this.isNullValue().BigDecimal bigDecimalValue()
BigDecimal value,
or null if this.isNullValue().decimalValue()Decimal decimalValue()
decimal as a Decimal,
which extends BigDecimal with support for negative zeros.Decimal value,
or null if this.isNullValue().bigDecimalValue()void setValue(long value)
void setValue(float value)
BigDecimal.valueOf(double) in that it
uses the double's canonical string representation provided by
Double.toString(double)}.Decimal.valueOf(double)void setValue(double value)
BigDecimal.valueOf(double) in that it
uses the double's canonical string representation provided by
Double.toString(double)}.Decimal.valueOf(double)void setValue(BigDecimal value)
Decimal.value - the new value of this decimal;
may be null to make this null.decimal.IonDecimal clone() throws UnknownSymbolException
IonValueIonValue.isReadOnly().
The cloned value will be created in the context of the same
ValueFactory as this instance; if you want a copy using a
different factory, then use ValueFactory.clone(IonValue)
instead.
clone in interface IonValueUnknownSymbolException - if any part of this value has unknown text but known Sid for
its field name, annotation or symbol.