Interface Hasher

All Known Implementing Classes:
JavaHasher

public interface Hasher
Interface defining methods for hashing various types of data. Implementations should provide consistent hashing for all supported types.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    put(boolean b)
    Adds a primitive boolean value to the hash computation
    void
    put(float f)
    Adds a primitive float value to the hash computation
    void
    put(int i)
    Adds a primitive int value to the hash computation
    void
    Adds a Boolean object to the hash computation
    void
    put(Enum<?> en)
    Adds an enum value to the hash computation
    void
    Adds an Integer object to the hash computation
    void
    Adds a String value to the hash computation
    void
    put(List<String> col)
    Adds a List of Strings to the hash computation (order-sensitive)
    void
    Adds a Map of String key-value pairs to the hash computation
    void
    put(Set<String> col)
    Adds a Set of Strings to the hash computation (order-insensitive)
    void
    put(IHashable hashable)
    Adds a hashable object to the hash computation
    void
    Adds a Collection of hashable objects with order sensitivity
    void
    Adds a Collection of hashable objects with order insensitivity
    void
    putUnordered(Map<String,? extends IHashable> map)
    Adds a Map of hashable objects with order insensitivity
  • Method Details

    • put

      void put(boolean b)
      Adds a primitive boolean value to the hash computation
    • put

      void put(Boolean b)
      Adds a Boolean object to the hash computation
    • put

      void put(String s)
      Adds a String value to the hash computation
    • put

      void put(float f)
      Adds a primitive float value to the hash computation
    • put

      void put(int i)
      Adds a primitive int value to the hash computation
    • put

      void put(Integer i)
      Adds an Integer object to the hash computation
    • put

      void put(IHashable hashable)
      Adds a hashable object to the hash computation
      Parameters:
      hashable - object implementing IHashable interface
    • put

      void put(Enum<?> en)
      Adds an enum value to the hash computation
    • put

      void put(Map<String,String> map)
      Adds a Map of String key-value pairs to the hash computation
    • put

      void put(List<String> col)
      Adds a List of Strings to the hash computation (order-sensitive)
    • put

      void put(Set<String> col)
      Adds a Set of Strings to the hash computation (order-insensitive)
    • putOrdered

      void putOrdered(Collection<? extends IHashable> col)
      Adds a Collection of hashable objects with order sensitivity
      Parameters:
      col - collection of objects implementing IHashable
    • putUnordered

      void putUnordered(Collection<? extends IHashable> col)
      Adds a Collection of hashable objects with order insensitivity
      Parameters:
      col - collection of objects implementing IHashable
    • putUnordered

      void putUnordered(Map<String,? extends IHashable> map)
      Adds a Map of hashable objects with order insensitivity
      Parameters:
      map - map containing objects implementing IHashable