Interface IonInt

  • All Superinterfaces:
    java.lang.Cloneable, IonNumber, IonValue

    public interface IonInt
    extends IonNumber
    An Ion int value.

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

    • Method Detail

      • intValue

        int intValue()
              throws NullValueException
        Gets the content of this Ion int as a Java int value.
        Returns:
        the int value.
        Throws:
        NullValueException - if this.isNullValue().
      • longValue

        long longValue()
                throws NullValueException
        Gets the content of this Ion int as a Java long value.
        Returns:
        the long value.
        Throws:
        NullValueException - if this.isNullValue().
      • bigIntegerValue

        java.math.BigInteger bigIntegerValue()
        Gets the content of this Ion int as a Java BigInteger value.
        Returns:
        the BigInteger value, or null if this is null.int.
      • bigDecimalValue

        java.math.BigDecimal bigDecimalValue()
        Gets the value of this Ion int as a BigDecimal. The scale of the BigDecimal is zero.
        Specified by:
        bigDecimalValue in interface IonNumber
        Returns:
        the BigDecimal value, or null if this.isNullValue().
      • 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 be null to make this null.int.
      • clone

        IonInt clone()
              throws UnknownSymbolException
        Description copied from interface: IonValue
        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 IonValue.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.

        Specified by:
        clone in interface IonValue
        Throws:
        UnknownSymbolException - if any part of this value has unknown text but known Sid for its field name, annotation or symbol.