Package org.lwjgl.util.meow
Class MeowHash
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.util.meow.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 ofMeowHash
structs.
-
Constructor Summary
Constructors Constructor Description MeowHash(java.nio.ByteBuffer container)
Creates aMeowHash
instance at the current position of the specifiedByteBuffer
container.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static MeowHash
calloc()
Returns a newMeowHash
instance allocated withmemCalloc
.static MeowHash.Buffer
calloc(int capacity)
Returns a newMeowHash.Buffer
instance allocated withmemCalloc
.static MeowHash
callocStack()
Returns a newMeowHash
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static MeowHash.Buffer
callocStack(int capacity)
Returns a newMeowHash.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static MeowHash.Buffer
callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newMeowHash.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static MeowHash
callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newMeowHash
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static MeowHash
create()
Returns a newMeowHash
instance allocated withBufferUtils
.static MeowHash.Buffer
create(int capacity)
Returns a newMeowHash.Buffer
instance allocated withBufferUtils
.static MeowHash
create(long address)
Returns a newMeowHash
instance for the specified memory address.static MeowHash.Buffer
create(long address, int capacity)
Create aMeowHash.Buffer
instance at the specified memory.static MeowHash
createSafe(long address)
static MeowHash.Buffer
createSafe(long address, int capacity)
static MeowHash
malloc()
Returns a newMeowHash
instance allocated withmemAlloc
.static MeowHash.Buffer
malloc(int capacity)
Returns a newMeowHash.Buffer
instance allocated withmemAlloc
.static MeowHash
mallocStack()
Returns a newMeowHash
instance allocated on the thread-localMemoryStack
.static MeowHash.Buffer
mallocStack(int capacity)
Returns a newMeowHash.Buffer
instance allocated on the thread-localMemoryStack
.static MeowHash.Buffer
mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newMeowHash.Buffer
instance allocated on the specifiedMemoryStack
.static MeowHash
mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newMeowHash
instance allocated on the specifiedMemoryStack
.static MeowU128
nu128(long struct)
Unsafe version ofu128()
.static java.nio.IntBuffer
nu32(long struct)
Unsafe version ofu32()
.static int
nu32(long struct, int index)
Unsafe version ofu32
.static java.nio.LongBuffer
nu64(long struct)
Unsafe version ofu64()
.static long
nu64(long struct, int index)
Unsafe version ofu64
.int
sizeof()
MeowU128
u128()
Returns aMeowU128
view of theu128
field.java.nio.IntBuffer
u32()
Returns aIntBuffer
view of theu32
field.int
u32(int index)
Returns the value at the specified index of theu32
field.java.nio.LongBuffer
u64()
Returns aLongBuffer
view of theu64
field.long
u64(int index)
Returns the value at the specified index of theu64
field.
-
-
-
Constructor Detail
-
MeowHash
public MeowHash(java.nio.ByteBuffer container)
Creates aMeowHash
instance at the current position of the specifiedByteBuffer
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 classorg.lwjgl.system.Struct
-
u64
public java.nio.LongBuffer u64()
Returns aLongBuffer
view of theu64
field.
-
u64
public long u64(int index)
Returns the value at the specified index of theu64
field.
-
u32
public java.nio.IntBuffer u32()
Returns aIntBuffer
view of theu32
field.
-
u32
public int u32(int index)
Returns the value at the specified index of theu32
field.
-
malloc
public static MeowHash malloc()
Returns a newMeowHash
instance allocated withmemAlloc
. The instance must be explicitly freed.
-
calloc
public static MeowHash calloc()
Returns a newMeowHash
instance allocated withmemCalloc
. The instance must be explicitly freed.
-
create
public static MeowHash create()
Returns a newMeowHash
instance allocated withBufferUtils
.
-
create
public static MeowHash create(long address)
Returns a newMeowHash
instance for the specified memory address.
-
createSafe
@Nullable public static MeowHash createSafe(long address)
-
malloc
public static MeowHash.Buffer malloc(int capacity)
Returns a newMeowHash.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
public static MeowHash.Buffer calloc(int capacity)
Returns a newMeowHash.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
public static MeowHash.Buffer create(int capacity)
Returns a newMeowHash.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
public static MeowHash.Buffer create(long address, int capacity)
Create aMeowHash.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
createSafe
@Nullable public static MeowHash.Buffer createSafe(long address, int capacity)
-
mallocStack
public static MeowHash mallocStack()
Returns a newMeowHash
instance allocated on the thread-localMemoryStack
.
-
callocStack
public static MeowHash callocStack()
Returns a newMeowHash
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.
-
mallocStack
public static MeowHash mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newMeowHash
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
callocStack
public static MeowHash callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newMeowHash
instance allocated on the specifiedMemoryStack
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 newMeowHash.Buffer
instance allocated on the thread-localMemoryStack
.- Parameters:
capacity
- the buffer capacity
-
callocStack
public static MeowHash.Buffer callocStack(int capacity)
Returns a newMeowHash.Buffer
instance allocated on the thread-localMemoryStack
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 newMeowHash.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
callocStack
public static MeowHash.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newMeowHash.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
nu64
public static java.nio.LongBuffer nu64(long struct)
Unsafe version ofu64()
.
-
nu64
public static long nu64(long struct, int index)
Unsafe version ofu64
.
-
nu32
public static java.nio.IntBuffer nu32(long struct)
Unsafe version ofu32()
.
-
nu32
public static int nu32(long struct, int index)
Unsafe version ofu32
.
-
-