Top Description Methods
com.amazon.ion

public Interface IonInt

extends IonNumber
Known Direct Implementers
com.amazon.ion.impl.lite.IonIntLite
Imports
java.math.BigDecimal, .BigInteger

An Ion int value.

Warning

This interface should not be implemented or extended by code outside of this library.

Method Summary

Modifier and TypeMethod and Description
public BigDecimal

Returns:

the BigDecimal value, or null if this.isNullValue().
bigDecimalValue
()

Redeclares com.amazon.ion.IonNumber.bigDecimalValue.

Gets the value of this Ion int as a BigDecimal.

public BigInteger

Returns:

the BigInteger value, or null if this is null.int.
bigIntegerValue
()

Gets the content of this Ion int as a Java BigInteger value.

public IonInt
clone()

Redeclares com.amazon.ion.IonValue.clone.

Creates a copy of this value and all of its children.

public IntegerSize
getIntegerSize()

Gets an IntegerSize representing the smallest-possible Java type of the underlying content, or null if this is null.int.

public int

Returns:

the int value.
intValue
()

Gets the content of this Ion int as a Java int value.

public long

Returns:

the long value.
longValue
()

Gets the content of this Ion int as a Java long value.

public void
setValue(int value)

Sets the content of this value.

public void
setValue(long value)

Sets the content of this value.

public void
setValue(Number
the new content of this int; may be null to make this null.int.
content
)

Sets the content of this value.

Inherited from com.amazon.ion.IonNumber:
isNumericValue

Method Detail

bigDecimalValueback to summary
public BigDecimal bigDecimalValue()

Redeclares com.amazon.ion.IonNumber.bigDecimalValue.

Gets the value of this Ion int as a BigDecimal. The scale of the BigDecimal is zero.

Returns:BigDecimal

the BigDecimal value, or null if this.isNullValue().

bigIntegerValueback to summary
public BigInteger bigIntegerValue()

Gets the content of this Ion int as a Java BigInteger value.

Returns:BigInteger

the BigInteger value, or null if this is null.int.

cloneback to summary
public IonInt clone() throws UnknownSymbolException

Redeclares com.amazon.ion.IonValue.clone.

Doc from com.amazon.ion.IonValue.clone.

Creates 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 instance 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.

Exceptions
UnknownSymbolException:
if any part of this value has unknown text but known Sid for its field name, annotation or symbol.
getIntegerSizeback to summary
public IntegerSize getIntegerSize()

Gets an IntegerSize representing the smallest-possible Java type of the underlying content, or null if this is null.int.

See Also
IonReader#getIntegerSize()
intValueback to summary
public int intValue() throws NullValueException

Gets the content of this Ion int as a Java int value.

Returns:int

the int value.

Exceptions
NullValueException:
if this.isNullValue().
longValueback to summary
public long longValue() throws NullValueException

Gets the content of this Ion int as a Java long value.

Returns:long

the long value.

Exceptions
NullValueException:
if this.isNullValue().
setValueback to summary
public void setValue(int value)

Sets the content of this value.

setValueback to summary
public void setValue(long value)

Sets the content of this value.

setValueback to summary
public void setValue(Number content)

Sets the content of this value. The integer portion of the number is used, any fractional portion is ignored.

Parameters
content:Number

the new content of this int; may be null to make this null.int.