Package jnr.ffi

Class StructLayout.NumberField

    • Field Detail

      • type

        protected final Type type
    • Method Detail

      • set

        public abstract void set​(Pointer ptr,
                                 java.lang.Number value)
        Sets the field to a new value.
        Parameters:
        ptr - The pointer to the field.
        value - The new value.
      • doubleValue

        public double doubleValue​(Pointer ptr)
        Returns an float representation of this Number.
        Parameters:
        ptr - The pointer to the field.
        Returns:
        an float value for this Number.
      • floatValue

        public float floatValue​(Pointer ptr)
        Returns an float representation of this Number.
        Parameters:
        ptr - The pointer to the field.
        Returns:
        an float value for this Number.
      • byteValue

        public byte byteValue​(Pointer ptr)
        Returns a byte representation of this Number.
        Parameters:
        ptr - The pointer to the field.
        Returns:
        a byte value for this Number.
      • shortValue

        public short shortValue​(Pointer ptr)
        Returns a short representation of this Number.
        Parameters:
        ptr - The pointer to the field.
        Returns:
        a short value for this Number.
      • intValue

        public abstract int intValue​(Pointer ptr)
        Returns a int representation of this Number.
        Parameters:
        ptr - The pointer to the field.
        Returns:
        a int value for this Number.
      • longValue

        public long longValue​(Pointer ptr)
        Returns a long representation of this Number.
        Parameters:
        ptr - The pointer to the field.
        Returns:
        a long value for this Number.
      • toString

        public java.lang.String toString​(Pointer ptr)
        Returns a string representation of this Number.
        Parameters:
        ptr - The pointer to the field.
        Returns:
        a string representation of this Number.