public HashMap(java.util.Map<K, V> map) { this(map, Equal.anyEqual(), Hash.anyHash()); }
public static <K, V> HashMap<K, V> fromMap(java.util.Map<K, V> map) { return fromMap(Equal.anyEqual(), Hash.anyHash(), map); }
/** 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); }
public <A> HashMap<A, V> mapKeys(F<K, A> function) { return mapKeys(function, Equal.anyEqual(), Hash.anyHash()); }
public <A, B> HashMap<A, B> map(F<K, A> keyFunction, F<V, B> valueFunction) { return map(keyFunction, valueFunction, Equal.anyEqual(), Hash.anyHash()); }
/** * 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 boolean equals(Object other) { return Equal.equals0(Tree.class, this, other, () -> Equal.treeEqual(Equal.anyEqual())); }
/** * Perform an equality test on this list which delegates to the .equals() method of the member * instances. This is implemented with Equal.nonEmptyListEqual using the anyEqual rule. * * @param obj the other object to check for equality against. * @return true if this list is equal to the provided argument */ @Override public boolean equals(final Object obj) { return Equal.equals0( NonEmptyList.class, this, obj, () -> Equal.nonEmptyListEqual(Equal.<A>anyEqual())); }