/** * Construct a hash with the given hash function. * * @param f The function to construct the hash with. * @return A hash that uses the given function. */ public static <A> Hash<A> hash(final F<A, Integer> f) { return new Hash<>(f); }
public HashMap(java.util.Map<K, V> map) { this(map, Equal.anyEqual(), Hash.anyHash()); }
@Override public int hashCode() { return Hash.naturalHash.hash(this); }
/** * Compute the hash code from this list as a function of the hash codes of its members. * Delegates to Hash.listHash, using the anyHash() rule, which uses the hash codes of the contents. * * @return the hash code for this list. */ @Override public final int hashCode() { return Hash.listHash(Hash.<A>anyHash()).hash(this); }
@Override public final int hashCode() { return Hash.optionHash(Hash.<A>anyHash()).hash(this); }
@Override public final int hashCode() { return Hash.eitherHash(Hash.<A>anyHash(), Hash.<B>anyHash()).hash(this); }
@Override public final int hashCode() { return Hash.zipperHash(Hash.<A>anyHash()).hash(this); }
@Override public final int hashCode() { return Hash.streamHash(Hash.<A>anyHash()).hash(this); }
@Override public int hashCode() { return Hash.treeMapHash(Hash.<K>anyHash(), Hash.<V>anyHash()).hash(this); }