Package jnr.ffi

Class Struct.NumberField

java.lang.Object
jnr.ffi.Struct.Member
jnr.ffi.Struct.NumberField
Direct Known Subclasses:
Struct.Address, Struct.Double, Struct.EnumField, Struct.Float, Struct.IntegerAlias, Struct.PointerField, Struct.Signed16, Struct.Signed32, Struct.Signed64, Struct.Signed8, Struct.SignedLong, Struct.Unsigned16, Struct.Unsigned32, Struct.Unsigned64, Struct.Unsigned8, Struct.UnsignedLong
Enclosing class:
Struct

public abstract class Struct.NumberField extends Struct.Member
Base class for all Number structure fields.
  • Field Details

    • type

      protected final Type type
  • Constructor Details

  • Method Details

    • getMemory

      public final Pointer getMemory()
    • struct

      public final Struct struct()
      Gets the Struct this Member is in.
      Returns:
      a Struct.
    • offset

      public final long offset()
      Gets the offset within the structure for this field.
    • set

      public abstract void set(Number value)
      Sets the field to a new value.
      Parameters:
      value - The new value.
    • doubleValue

      public double doubleValue()
      Returns an float representation of this Number.
      Returns:
      an float value for this Number.
    • floatValue

      public float floatValue()
      Returns an float representation of this Number.
      Returns:
      an float value for this Number.
    • byteValue

      public byte byteValue()
      Returns a byte representation of this Number.
      Returns:
      a byte value for this Number.
    • shortValue

      public short shortValue()
      Returns a short representation of this Number.
      Returns:
      a short value for this Number.
    • intValue

      public abstract int intValue()
      Returns a int representation of this Number.
      Returns:
      a int value for this Number.
    • longValue

      public long longValue()
      Returns a long representation of this Number.
      Returns:
      a long value for this Number.
    • toString

      public String toString()
      Returns a string representation of this Number.
      Overrides:
      toString in class Object
      Returns:
      a string representation of this Number.