Package org.pgcodekeeper.core.hasher
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 TypeMethodDescriptionvoidput(boolean b) Adds a primitive boolean value to the hash computationvoidput(float f) Adds a primitive float value to the hash computationvoidput(int i) Adds a primitive int value to the hash computationvoidAdds a Boolean object to the hash computationvoidAdds an enum value to the hash computationvoidAdds an Integer object to the hash computationvoidAdds a String value to the hash computationvoidAdds a List of Strings to the hash computation (order-sensitive)voidAdds a Map of String key-value pairs to the hash computationvoidAdds a Set of Strings to the hash computation (order-insensitive)voidAdds a hashable object to the hash computationvoidputOrdered(Collection<? extends IHashable> col) Adds a Collection of hashable objects with order sensitivityvoidputUnordered(Collection<? extends IHashable> col) Adds a Collection of hashable objects with order insensitivityvoidputUnordered(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
Adds a Boolean object to the hash computation -
put
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
Adds an Integer object to the hash computation -
put
Adds a hashable object to the hash computation- Parameters:
hashable- object implementing IHashable interface
-
put
Adds an enum value to the hash computation -
put
Adds a Map of String key-value pairs to the hash computation -
put
Adds a List of Strings to the hash computation (order-sensitive) -
put
Adds a Set of Strings to the hash computation (order-insensitive) -
putOrdered
Adds a Collection of hashable objects with order sensitivity- Parameters:
col- collection of objects implementing IHashable
-
putUnordered
Adds a Collection of hashable objects with order insensitivity- Parameters:
col- collection of objects implementing IHashable
-
putUnordered
Adds a Map of hashable objects with order insensitivity- Parameters:
map- map containing objects implementing IHashable
-