Class YGFloatOptional

  • All Implemented Interfaces:
    Pointer

    public class YGFloatOptional
    extends Struct

    Layout

    
     struct YGFloatOptional {
         float value;
         bool isUndefined;
     }
    • Field Detail

      • SIZEOF

        The struct size in bytes.
      • ALIGNOF

        The struct alignment in bytes.
      • VALUE, ISUNDEFINED

        The struct member offsets.
    • Constructor Detail

      • YGFloatOptional

        public YGFloatOptional​(java.nio.ByteBuffer container)
        Creates a YGFloatOptional instance at the current position of the specified ByteBuffer container. Changes to the buffer's content will be visible to the struct instance and vice versa.

        The created instance holds a strong reference to the container object.

    • Method Detail

      • sizeof

        public int sizeof()
        Description copied from class: Struct
        Returns sizeof(struct).
        Specified by:
        sizeof in class Struct
      • value

        public float value()
        Returns the value of the value field.
      • isUndefined

        public boolean isUndefined()
        Returns the value of the isUndefined field.
      • createSafe

        @Nullable
        public static YGFloatOptional createSafe​(long address)
        Like create, but returns null if address is NULL.
      • create

        public static YGFloatOptional.Buffer create​(long address,
                                                    int capacity)
        Create a YGFloatOptional.Buffer instance at the specified memory.
        Parameters:
        address - the memory address
        capacity - the buffer capacity
      • createSafe

        @Nullable
        public static YGFloatOptional.Buffer createSafe​(long address,
                                                        int capacity)
        Like create, but returns null if address is NULL.
      • nvalue

        public static float nvalue​(long struct)
        Unsafe version of value().
      • nisUndefined

        public static boolean nisUndefined​(long struct)
        Unsafe version of isUndefined().