Package com.amazon.ion
Interface IonInt
An Ion
int value.
WARNING: This interface should not be implemented or extended by code outside of this library.
-
Field Summary
Fields inherited from interface com.amazon.ion.IonValue
EMPTY_ARRAY -
Method Summary
Modifier and TypeMethodDescriptionGets the value of this Ionintas aBigDecimal.Gets the content of this Ionintas a JavaBigIntegervalue.clone()Creates a copy of this value and all of its children.Gets anIntegerSizerepresenting the smallest-possible Java type of the underlying content, ornullif this isnull.int.intintValue()Gets the content of this Ionintas a Javaintvalue.longGets 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.voidSets the content of this value.Methods inherited from interface com.amazon.ion.IonNumber
isNumericValueMethods 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 Details
-
intValue
Gets the content of this Ionintas a Javaintvalue.- Returns:
- the int value.
- Throws:
NullValueException- ifthis.isNullValue().
-
longValue
Gets the content of this Ionintas a Javalongvalue.- Returns:
- the long value.
- Throws:
NullValueException- ifthis.isNullValue().
-
bigIntegerValue
BigInteger bigIntegerValue()Gets the content of this Ionintas a JavaBigIntegervalue.- Returns:
- the
BigIntegervalue, ornullif this isnull.int.
-
bigDecimalValue
BigDecimal bigDecimalValue()- 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:
-
setValue
void setValue(int value) Sets the content of this value. -
setValue
void setValue(long value) Sets the content of this value. -
setValue
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
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.
-