Beispiel #1
0
 public HashMap(java.util.Map<K, V> map) {
   this(map, Equal.anyEqual(), Hash.anyHash());
 }
Beispiel #2
0
 public static <K, V> HashMap<K, V> fromMap(java.util.Map<K, V> map) {
   return fromMap(Equal.anyEqual(), Hash.anyHash(), map);
 }
Beispiel #3
0
 /** 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);
 }
Beispiel #4
0
 public <A> HashMap<A, V> mapKeys(F<K, A> function) {
   return mapKeys(function, Equal.anyEqual(), Hash.anyHash());
 }
Beispiel #5
0
 public <A, B> HashMap<A, B> map(F<K, A> keyFunction, F<V, B> valueFunction) {
   return map(keyFunction, valueFunction, Equal.anyEqual(), Hash.anyHash());
 }
Beispiel #6
0
 /**
  * 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());
 }
Beispiel #7
0
 @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()));
 }