Interface ChunkHasher

All Known Implementing Classes:
BooleanArrayChunkHasher, BooleanChunkHasher, ByteArrayChunkHasher, ByteChunkHasher, CharArrayChunkHasher, CharChunkHasher, DoubleArrayChunkHasher, DoubleChunkHasher, FloatArrayChunkHasher, FloatChunkHasher, IntArrayChunkHasher, IntChunkHasher, LongArrayChunkHasher, LongChunkHasher, ObjectArrayChunkHasher, ObjectArrayChunkShallowHasher, ObjectChunkHasher, ShortArrayChunkHasher, ShortChunkHasher

public interface ChunkHasher
  • Method Details

    • hashInitial

      void hashInitial(Chunk<Attributes.Values> values, WritableIntChunk<Attributes.HashCode> destination)
      Called for the first (or only) hash value, sets the hash codes in destination corresponding to values.
      Parameters:
      values - the values to hash
      destination - the chunk to write hash values into
    • hashUpdate

      void hashUpdate(Chunk<Attributes.Values> values, WritableIntChunk<Attributes.HashCode> destination)
      Called for subsequent hash values, updates the hash codes in destination corresponding to values.
      Parameters:
      values - the values to hash
      destination - the chunk to update hash values into
    • hashInitial

      int hashInitial(Object value)
      Hash a boxed object.
      Parameters:
      value - the boxed object to hash
      Returns:
      the hashcode, as if you called the chunked version of this function
    • hashUpdate

      int hashUpdate(int existing, Object value)
      Update a hash for a boxed object.
      Parameters:
      existing - the existing hashcode
      value - the boxed object to add to the hash code
      Returns:
      the hashcode, as if you called the chunked version of this function
    • makeHasher

      static ChunkHasher makeHasher(ChunkType chunkType, Class<?> columnType, Class<?> componentType)
    • makeArrayHasher

      static ChunkHasher makeArrayHasher(Class<?> componentType)
    • scrambleHash

      static int scrambleHash(int x)