Package com.amazon.ion
Interface IonInt
-
-
Field Summary
-
Fields inherited from interface com.amazon.ion.IonValue
EMPTY_ARRAY
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.math.BigDecimalbigDecimalValue()Gets the value of this Ionintas aBigDecimal.java.math.BigIntegerbigIntegerValue()Gets the content of this Ionintas a JavaBigIntegervalue.IonIntclone()Creates a copy of this value and all of its children.IntegerSizegetIntegerSize()Gets anIntegerSizerepresenting the smallest-possible Java type of the underlying content, ornullif this isnull.int.intintValue()Gets the content of this Ionintas a Javaintvalue.longlongValue()Gets the content of this Ionintas a Javalongvalue.voidsetValue(int value)Sets the content of this value.voidsetValue(long value)Sets the content of this value.voidsetValue(java.lang.Number content)Sets the content of this value.-
Methods inherited from interface com.amazon.ion.IonNumber
isNumericValue
-
Methods inherited from interface com.amazon.ion.IonValue
accept, addTypeAnnotation, clearTypeAnnotations, equals, getContainer, getFieldId, getFieldName, getFieldNameSymbol, getSymbolTable, getSystem, getType, getTypeAnnotations, getTypeAnnotationSymbols, hashCode, hasTypeAnnotation, isNullValue, isReadOnly, makeReadOnly, removeFromContainer, removeTypeAnnotation, setTypeAnnotations, setTypeAnnotationSymbols, topLevelValue, toPrettyString, toString, toString, writeTo
-
-
-
-
Method Detail
-
intValue
int intValue() throws NullValueExceptionGets the content of this Ionintas a Javaintvalue.- Returns:
- the int value.
- Throws:
NullValueException- ifthis.isNullValue().
-
longValue
long longValue() throws NullValueExceptionGets the content of this Ionintas a Javalongvalue.- Returns:
- the long value.
- Throws:
NullValueException- ifthis.isNullValue().
-
bigIntegerValue
java.math.BigInteger bigIntegerValue()
Gets the content of this Ionintas a JavaBigIntegervalue.- Returns:
- the
BigIntegervalue, ornullif this isnull.int.
-
bigDecimalValue
java.math.BigDecimal bigDecimalValue()
Gets the value of this Ionintas aBigDecimal. The scale of theBigDecimalis zero.- Specified by:
bigDecimalValuein interfaceIonNumber- Returns:
- the
BigDecimalvalue, ornullifthis.isNullValue().
-
getIntegerSize
IntegerSize getIntegerSize()
Gets anIntegerSizerepresenting the smallest-possible Java type of the underlying content, ornullif this isnull.int.- See Also:
IonReader.getIntegerSize()
-
setValue
void setValue(int value)
Sets the content of this value.
-
setValue
void setValue(long value)
Sets the content of this value.
-
setValue
void setValue(java.lang.Number content)
Sets the content of this value. The integer portion of the number is used, any fractional portion is ignored.- Parameters:
content- the new content of this int; may benullto make thisnull.int.
-
clone
IonInt clone() throws UnknownSymbolException
Description copied from interface:IonValueCreates a copy of this value and all of its children. The cloned value may use the same shared symbol tables, but it will have an independent local symbol table if necessary. The cloned value will be modifiable regardless of whether this instanceIonValue.isReadOnly().The cloned value will be created in the context of the same
ValueFactoryas this instance; if you want a copy using a different factory, then useValueFactory.clone(IonValue)instead.- Specified by:
clonein interfaceIonValue- Throws:
UnknownSymbolException- if any part of this value has unknown text but known Sid for its field name, annotation or symbol.
-
-