Package io.deephaven.chunk.util.hashing
Class CharChunkHasher
java.lang.Object
io.deephaven.chunk.util.hashing.CharChunkHasher
- All Implemented Interfaces:
ChunkHasher
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidhashInitial(Chunk<Values> values, WritableIntChunk<HashCodes> destination) Called for the first (or only) hash value, sets the hash codes in destination corresponding to values.inthashInitial(Object value) Hash a boxed object.static inthashInitialSingle(char value) inthashUpdate(int existing, Object value) Update a hash for a boxed object.voidhashUpdate(Chunk<Values> values, WritableIntChunk<HashCodes> destination) Called for subsequent hash values, updates the hash codes in destination corresponding to values.static inthashUpdateSingle(int existing, char newValue)
-
Field Details
-
INSTANCE
-
-
Constructor Details
-
CharChunkHasher
public CharChunkHasher()
-
-
Method Details
-
hashInitialSingle
public static int hashInitialSingle(char value) -
hashUpdateSingle
public static int hashUpdateSingle(int existing, char newValue) -
hashInitial
Description copied from interface:ChunkHasherHash a boxed object.- Specified by:
hashInitialin interfaceChunkHasher- Parameters:
value- the boxed object to hash- Returns:
- the hashcode, as if you called the chunked version of this function
-
hashUpdate
Description copied from interface:ChunkHasherUpdate a hash for a boxed object.- Specified by:
hashUpdatein interfaceChunkHasher- Parameters:
existing- the existing hashcodevalue- the boxed object to add to the hash code- Returns:
- the hashcode, as if you called the chunked version of this function
-
hashInitial
Description copied from interface:ChunkHasherCalled for the first (or only) hash value, sets the hash codes in destination corresponding to values.- Specified by:
hashInitialin interfaceChunkHasher- Parameters:
values- the values to hashdestination- the chunk to write hash values into
-
hashUpdate
Description copied from interface:ChunkHasherCalled for subsequent hash values, updates the hash codes in destination corresponding to values.- Specified by:
hashUpdatein interfaceChunkHasher- Parameters:
values- the values to hashdestination- the chunk to update hash values into
-