B
- the type of BytesStore
that this function can compute hash values for.public interface BytesStoreHash<B extends BytesStore> extends ToLongFunction<B>
BytesStore
.
This interface provides static methods for computing 32-bit and 64-bit hash values,
using either optimized or vanilla implementations.Modifier and Type | Method and Description |
---|---|
long |
applyAsLong(BytesStore bytes,
long length)
Computes a 64-bit hash value of the given
BytesStore with a specified length. |
static long |
hash(@NotNull BytesStore b)
Computes a 64-bit hash value of the given
BytesStore . |
static long |
hash(@NotNull BytesStore b,
long length)
Computes a 64-bit hash value of the given
BytesStore with a specified length. |
static int |
hash32(BytesStore b)
Computes a 32-bit hash value of the given
BytesStore . |
static int |
hash32(@NotNull BytesStore b,
int length)
Computes a 32-bit hash value of the given
BytesStore with a specified length. |
applyAsLong
static long hash(@NotNull @NotNull BytesStore b)
BytesStore
.b
- the BytesStore
to compute the hash for.static long hash(@NotNull @NotNull BytesStore b, long length) throws IllegalStateException, BufferUnderflowException
BytesStore
with a specified length.b
- the BytesStore
to compute the hash for.length
- the number of bytes to include in the hash computation.IllegalStateException
- if the underlying memory is not readable.BufferUnderflowException
- if the length specified is greater than the available bytes.static int hash32(BytesStore b)
BytesStore
.b
- the BytesStore
to compute the hash for.static int hash32(@NotNull @NotNull BytesStore b, int length) throws IllegalStateException, BufferUnderflowException
BytesStore
with a specified length.b
- the BytesStore
to compute the hash for.length
- the number of bytes to include in the hash computation.IllegalStateException
- if the underlying memory is not readable.BufferUnderflowException
- if the length specified is greater than the available bytes.long applyAsLong(BytesStore bytes, long length) throws IllegalStateException, BufferUnderflowException
BytesStore
with a specified length.bytes
- the BytesStore
to compute the hash for.length
- the number of bytes to include in the hash computation.IllegalStateException
- if the underlying memory is not readable.BufferUnderflowException
- if the length specified is greater than the available bytes.Copyright © 2023. All rights reserved.