Class MeowHash

  • All Implemented Interfaces:
    java.lang.AutoCloseable, org.lwjgl.system.NativeResource, org.lwjgl.system.Pointer

    public class MeowHash
    extends org.lwjgl.system.Struct
    implements org.lwjgl.system.NativeResource

    Layout

    
     union meow_hash {
         meow_u128 u128;
         meow_u64 u64[2];
         meow_u32 u32[4];
     }
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  MeowHash.Buffer
      An array of MeowHash structs.
      • Nested classes/interfaces inherited from interface org.lwjgl.system.Pointer

        org.lwjgl.system.Pointer.Default
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static int ALIGNOF
      The struct alignment in bytes.
      static int SIZEOF
      The struct size in bytes.
      static int U128
      U32
      U64
      The struct member offsets.
      • Fields inherited from interface org.lwjgl.system.Pointer

        BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE
    • Constructor Summary

      Constructors 
      Constructor Description
      MeowHash​(java.nio.ByteBuffer container)
      Creates a MeowHash instance at the current position of the specified ByteBuffer container.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static MeowHash calloc()
      Returns a new MeowHash instance allocated with memCalloc.
      static MeowHash.Buffer calloc​(int capacity)
      Returns a new MeowHash.Buffer instance allocated with memCalloc.
      static MeowHash callocStack()
      Returns a new MeowHash instance allocated on the thread-local MemoryStack and initializes all its bits to zero.
      static MeowHash.Buffer callocStack​(int capacity)
      Returns a new MeowHash.Buffer instance allocated on the thread-local MemoryStack and initializes all its bits to zero.
      static MeowHash.Buffer callocStack​(int capacity, org.lwjgl.system.MemoryStack stack)
      Returns a new MeowHash.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.
      static MeowHash callocStack​(org.lwjgl.system.MemoryStack stack)
      Returns a new MeowHash instance allocated on the specified MemoryStack and initializes all its bits to zero.
      static MeowHash create()
      Returns a new MeowHash instance allocated with BufferUtils.
      static MeowHash.Buffer create​(int capacity)
      Returns a new MeowHash.Buffer instance allocated with BufferUtils.
      static MeowHash create​(long address)
      Returns a new MeowHash instance for the specified memory address.
      static MeowHash.Buffer create​(long address, int capacity)
      Create a MeowHash.Buffer instance at the specified memory.
      static MeowHash createSafe​(long address)
      Like create, but returns null if address is NULL.
      static MeowHash.Buffer createSafe​(long address, int capacity)
      Like create, but returns null if address is NULL.
      static MeowHash malloc()
      Returns a new MeowHash instance allocated with memAlloc.
      static MeowHash.Buffer malloc​(int capacity)
      Returns a new MeowHash.Buffer instance allocated with memAlloc.
      static MeowHash mallocStack()
      Returns a new MeowHash instance allocated on the thread-local MemoryStack.
      static MeowHash.Buffer mallocStack​(int capacity)
      Returns a new MeowHash.Buffer instance allocated on the thread-local MemoryStack.
      static MeowHash.Buffer mallocStack​(int capacity, org.lwjgl.system.MemoryStack stack)
      Returns a new MeowHash.Buffer instance allocated on the specified MemoryStack.
      static MeowHash mallocStack​(org.lwjgl.system.MemoryStack stack)
      Returns a new MeowHash instance allocated on the specified MemoryStack.
      static MeowU128 nu128​(long struct)
      Unsafe version of u128().
      static java.nio.IntBuffer nu32​(long struct)
      Unsafe version of u32().
      static int nu32​(long struct, int index)
      Unsafe version of u32.
      static java.nio.LongBuffer nu64​(long struct)
      Unsafe version of u64().
      static long nu64​(long struct, int index)
      Unsafe version of u64.
      int sizeof()  
      MeowU128 u128()
      Returns a MeowU128 view of the u128 field.
      java.nio.IntBuffer u32()
      Returns a IntBuffer view of the u32 field.
      int u32​(int index)
      Returns the value at the specified index of the u32 field.
      java.nio.LongBuffer u64()
      Returns a LongBuffer view of the u64 field.
      long u64​(int index)
      Returns the value at the specified index of the u64 field.
      • Methods inherited from interface org.lwjgl.system.NativeResource

        close, free
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
      • Methods inherited from class org.lwjgl.system.Pointer.Default

        address, equals, hashCode, toString
      • Methods inherited from class org.lwjgl.system.Struct

        clear, free, isNull
    • Field Detail

      • SIZEOF

        The struct size in bytes.
      • ALIGNOF

        The struct alignment in bytes.
      • U128, U64, U32

        The struct member offsets.
    • Constructor Detail

      • MeowHash

        public MeowHash​(java.nio.ByteBuffer container)
        Creates a MeowHash 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()
        Specified by:
        sizeof in class org.lwjgl.system.Struct
      • u64

        public java.nio.LongBuffer u64()
        Returns a LongBuffer view of the u64 field.
      • u64

        public long u64​(int index)
        Returns the value at the specified index of the u64 field.
      • u32

        public java.nio.IntBuffer u32()
        Returns a IntBuffer view of the u32 field.
      • u32

        public int u32​(int index)
        Returns the value at the specified index of the u32 field.
      • malloc

        public static MeowHash malloc()
        Returns a new MeowHash instance allocated with memAlloc. The instance must be explicitly freed.
      • calloc

        public static MeowHash calloc()
        Returns a new MeowHash instance allocated with memCalloc. The instance must be explicitly freed.
      • create

        public static MeowHash create()
        Returns a new MeowHash instance allocated with BufferUtils.
      • create

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

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

        public static MeowHash.Buffer malloc​(int capacity)
        Returns a new MeowHash.Buffer instance allocated with memAlloc. The instance must be explicitly freed.
        Parameters:
        capacity - the buffer capacity
      • calloc

        public static MeowHash.Buffer calloc​(int capacity)
        Returns a new MeowHash.Buffer instance allocated with memCalloc. The instance must be explicitly freed.
        Parameters:
        capacity - the buffer capacity
      • create

        public static MeowHash.Buffer create​(int capacity)
        Returns a new MeowHash.Buffer instance allocated with BufferUtils.
        Parameters:
        capacity - the buffer capacity
      • create

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

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

        public static MeowHash mallocStack()
        Returns a new MeowHash instance allocated on the thread-local MemoryStack.
      • callocStack

        public static MeowHash callocStack()
        Returns a new MeowHash instance allocated on the thread-local MemoryStack and initializes all its bits to zero.
      • mallocStack

        public static MeowHash mallocStack​(org.lwjgl.system.MemoryStack stack)
        Returns a new MeowHash instance allocated on the specified MemoryStack.
        Parameters:
        stack - the stack from which to allocate
      • callocStack

        public static MeowHash callocStack​(org.lwjgl.system.MemoryStack stack)
        Returns a new MeowHash instance allocated on the specified MemoryStack and initializes all its bits to zero.
        Parameters:
        stack - the stack from which to allocate
      • mallocStack

        public static MeowHash.Buffer mallocStack​(int capacity)
        Returns a new MeowHash.Buffer instance allocated on the thread-local MemoryStack.
        Parameters:
        capacity - the buffer capacity
      • callocStack

        public static MeowHash.Buffer callocStack​(int capacity)
        Returns a new MeowHash.Buffer instance allocated on the thread-local MemoryStack and initializes all its bits to zero.
        Parameters:
        capacity - the buffer capacity
      • mallocStack

        public static MeowHash.Buffer mallocStack​(int capacity,
                                                  org.lwjgl.system.MemoryStack stack)
        Returns a new MeowHash.Buffer instance allocated on the specified MemoryStack.
        Parameters:
        stack - the stack from which to allocate
        capacity - the buffer capacity
      • callocStack

        public static MeowHash.Buffer callocStack​(int capacity,
                                                  org.lwjgl.system.MemoryStack stack)
        Returns a new MeowHash.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.
        Parameters:
        stack - the stack from which to allocate
        capacity - the buffer capacity
      • nu128

        public static MeowU128 nu128​(long struct)
        Unsafe version of u128().
      • nu64

        public static java.nio.LongBuffer nu64​(long struct)
        Unsafe version of u64().
      • nu64

        public static long nu64​(long struct,
                                int index)
        Unsafe version of u64.
      • nu32

        public static java.nio.IntBuffer nu32​(long struct)
        Unsafe version of u32().
      • nu32

        public static int nu32​(long struct,
                               int index)
        Unsafe version of u32.