Class NkChartSlot

    • Field Detail

      • SIZEOF

        The struct size in bytes.
      • ALIGNOF

        The struct alignment in bytes.
      • TYPE, COLOR, HIGHLIGHT, MIN, MAX, RANGE, COUNT, LAST, INDEX

        The struct member offsets.
    • Constructor Detail

      • NkChartSlot

        public NkChartSlot​(java.nio.ByteBuffer container)
        Creates a NkChartSlot 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
      • type

        public int type()
        Returns the value of the type field.
      • color

        public NkColor color()
        Returns a NkColor view of the color field.
      • color

        public NkChartSlot color​(java.util.function.Consumer<NkColor> consumer)
        Passes the color field to the specified Consumer.
      • highlight

        public NkColor highlight()
        Returns a NkColor view of the highlight field.
      • highlight

        public NkChartSlot highlight​(java.util.function.Consumer<NkColor> consumer)
        Passes the highlight field to the specified Consumer.
      • min

        public float min()
        Returns the value of the min field.
      • max

        public float max()
        Returns the value of the max field.
      • range

        public float range()
        Returns the value of the range field.
      • count

        public int count()
        Returns the value of the count field.
      • last

        public NkVec2 last()
        Returns a NkVec2 view of the last field.
      • last

        public NkChartSlot last​(java.util.function.Consumer<NkVec2> consumer)
        Passes the last field to the specified Consumer.
      • index

        public int index()
        Returns the value of the index field.
      • create

        public static NkChartSlot create​(long address)
        Returns a new NkChartSlot instance for the specified memory address.
      • createSafe

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

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

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

        public static int ntype​(long struct)
        Unsafe version of type().
      • ncolor

        public static NkColor ncolor​(long struct)
        Unsafe version of color().
      • nhighlight

        public static NkColor nhighlight​(long struct)
        Unsafe version of highlight().
      • nmin

        public static float nmin​(long struct)
        Unsafe version of min().
      • nmax

        public static float nmax​(long struct)
        Unsafe version of max().
      • nrange

        public static float nrange​(long struct)
        Unsafe version of range().
      • ncount

        public static int ncount​(long struct)
        Unsafe version of count().
      • nlast

        public static NkVec2 nlast​(long struct)
        Unsafe version of last().
      • nindex

        public static int nindex​(long struct)
        Unsafe version of index().