/** * Converts the Iterable to a HashMap */ public static <K, V> HashMap<K, V> iterableHashMap(final Iterable<P2<K, V>> entries) { return iterableHashMap(Equal.anyEqual(), Hash.anyHash(), entries); }
/** * Create a HashSet from the Iterable. */ public static <A> HashSet<A> iterableHashSet(final Iterable<A> it) { return iterableHashSet(anyEqual(), anyHash(), it); }
/** * Construct a hash map that uses {@link Object#equals} and {@link Object#hashCode}. * * @return A new hash map that uses {@link Object#equals} and {@link Object#hashCode}. */ public static <K, V> HashMap<K, V> hashMap() { return hashMap(Equal.anyEqual(), Hash.anyHash()); }
@Override public final int hashCode() { return Hash.v4Hash(Hash.<A>anyHash()).hash(this); }
@Override public final int hashCode() { return Hash.v3Hash(Hash.<A>anyHash()).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); }
/** * Creates an empty HashSet */ public static <A> HashSet<A> empty() { return empty(anyEqual(), anyHash()); }
@Override public final int hashCode() { return Hash.p1Hash(Hash.<A>anyHash()).hash(this); }
@Override public final int hashCode() { return Hash.treeZipperHash(Hash.<A>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.arrayHash(Hash.<A>anyHash()).hash(this); }
@Override public final int hashCode() { return Hash.v5Hash(Hash.<A>anyHash()).hash(this); }
@Override public int hashCode() { return Hash.seqHash(Hash.<A>anyHash()).hash(this); }
@Override public int hashCode() { return Hash.treeHash(Hash.<A>anyHash()).hash(this); }