Removes custom hashcode/equals implementation from Key/Value.

Current implementation was using String hashcode which is not
a good idea because most of the time String hashcodes are
calculated from scratch.

Default hashcode implementation is good enough for our benchmarking
purposes.

Change-Id: Id6e10f1283ea7f680fb367a7fefc97a8e16928a8
diff --git a/benchmarks/src/main/java/com/google/gwt/benchmark/benchmarks/java/util/shared/HashMapObjectContainsKeyBenchmark.java b/benchmarks/src/main/java/com/google/gwt/benchmark/benchmarks/java/util/shared/HashMapObjectContainsKeyBenchmark.java
index e8e551f..5b578a0 100644
--- a/benchmarks/src/main/java/com/google/gwt/benchmark/benchmarks/java/util/shared/HashMapObjectContainsKeyBenchmark.java
+++ b/benchmarks/src/main/java/com/google/gwt/benchmark/benchmarks/java/util/shared/HashMapObjectContainsKeyBenchmark.java
@@ -80,8 +80,8 @@
     map = new HashMap<Object, Object>();
 
     for (int i = 0; i < length; i++) {
-      Key key = new Key("thisissomekey" + i);
-      Value value = new Value("thisissomevalue" + i);
+      Key key = new Key();
+      Value value = new Value();
       keysInMap.push(key);
       keysNotInMap.push(value);
       map.put(key, value);
diff --git a/benchmarks/src/main/java/com/google/gwt/benchmark/benchmarks/java/util/shared/HashMapObjectContainsValueBenchmark.java b/benchmarks/src/main/java/com/google/gwt/benchmark/benchmarks/java/util/shared/HashMapObjectContainsValueBenchmark.java
index 9631940..d14bf2f 100644
--- a/benchmarks/src/main/java/com/google/gwt/benchmark/benchmarks/java/util/shared/HashMapObjectContainsValueBenchmark.java
+++ b/benchmarks/src/main/java/com/google/gwt/benchmark/benchmarks/java/util/shared/HashMapObjectContainsValueBenchmark.java
@@ -80,8 +80,8 @@
     map = new HashMap<Key, Value>();
 
     for (int i = 0; i < length; i++) {
-      Key key = new Key("thisissomekey" + i);
-      Value value = new Value("thisissomevalue" + i);
+      Key key = new Key();
+      Value value = new Value();
       valuesInMap.push(value);
       valuesNotInMap.push(key);
       map.put(key, value);
diff --git a/benchmarks/src/main/java/com/google/gwt/benchmark/benchmarks/java/util/shared/HashMapObjectIterationBenchmark.java b/benchmarks/src/main/java/com/google/gwt/benchmark/benchmarks/java/util/shared/HashMapObjectIterationBenchmark.java
index e5f63a9..55bd77c 100644
--- a/benchmarks/src/main/java/com/google/gwt/benchmark/benchmarks/java/util/shared/HashMapObjectIterationBenchmark.java
+++ b/benchmarks/src/main/java/com/google/gwt/benchmark/benchmarks/java/util/shared/HashMapObjectIterationBenchmark.java
@@ -69,7 +69,7 @@
     map = new HashMap<Object, Object>();
 
     for (int i = 0; i < length; i++) {
-      map.put(new Key("thisissomekey" + i), new Value("thisissomevalue" + i));
+      map.put(new Key(), new Value());
     }
   }
 }
\ No newline at end of file
diff --git a/benchmarks/src/main/java/com/google/gwt/benchmark/benchmarks/java/util/shared/HashMapObjectPutBenchmark.java b/benchmarks/src/main/java/com/google/gwt/benchmark/benchmarks/java/util/shared/HashMapObjectPutBenchmark.java
index 4f6d648..98d56ba 100644
--- a/benchmarks/src/main/java/com/google/gwt/benchmark/benchmarks/java/util/shared/HashMapObjectPutBenchmark.java
+++ b/benchmarks/src/main/java/com/google/gwt/benchmark/benchmarks/java/util/shared/HashMapObjectPutBenchmark.java
@@ -66,8 +66,8 @@
     values = CollectionFactory.create();
 
     for (int i = 0; i < length; i++) {
-      keys.push(new Key("thisissomekey" + i));
-      values.push(new Value("thisissomevalue" + i));
+      keys.push(new Key());
+      values.push(new Value());
     }
   }
 }
diff --git a/benchmarks/src/main/java/com/google/gwt/benchmark/benchmarks/java/util/shared/helper/Key.java b/benchmarks/src/main/java/com/google/gwt/benchmark/benchmarks/java/util/shared/helper/Key.java
index 748ab76..a0354ff 100644
--- a/benchmarks/src/main/java/com/google/gwt/benchmark/benchmarks/java/util/shared/helper/Key.java
+++ b/benchmarks/src/main/java/com/google/gwt/benchmark/benchmarks/java/util/shared/helper/Key.java
@@ -19,34 +19,4 @@
  * Key can act as a key in hashed structures.
  */
 public class Key {
-  private final String key;
-
-  public Key(String key) {
-    this.key = key;
-  }
-
-  @Override
-  public int hashCode() {
-    final int prime = 31;
-    int result = 1;
-    result = prime * result + ((key == null) ? 0 : key.hashCode());
-    return result;
-  }
-
-  @Override
-  public boolean equals(Object obj) {
-    if (this == obj)
-      return true;
-    if (obj == null)
-      return false;
-    if (getClass() != obj.getClass())
-      return false;
-    Key other = (Key) obj;
-    if (key == null) {
-      if (other.key != null)
-        return false;
-    } else if (!key.equals(other.key))
-      return false;
-    return true;
-  }
 }
diff --git a/benchmarks/src/main/java/com/google/gwt/benchmark/benchmarks/java/util/shared/helper/Value.java b/benchmarks/src/main/java/com/google/gwt/benchmark/benchmarks/java/util/shared/helper/Value.java
index 21e4c0b..4f4656c 100644
--- a/benchmarks/src/main/java/com/google/gwt/benchmark/benchmarks/java/util/shared/helper/Value.java
+++ b/benchmarks/src/main/java/com/google/gwt/benchmark/benchmarks/java/util/shared/helper/Value.java
@@ -19,34 +19,4 @@
  * Value can act as a value for hashed structures.
  */
 public class Value {
-  private final String value;
-
-  public Value(String value) {
-    this.value = value;
-  }
-
-  @Override
-  public int hashCode() {
-    final int prime = 31;
-    int result = 1;
-    result = prime * result + ((value == null) ? 0 : value.hashCode());
-    return result;
-  }
-
-  @Override
-  public boolean equals(Object obj) {
-    if (this == obj)
-      return true;
-    if (obj == null)
-      return false;
-    if (getClass() != obj.getClass())
-      return false;
-    Value other = (Value) obj;
-    if (value == null) {
-      if (other.value != null)
-        return false;
-    } else if (!value.equals(other.value))
-      return false;
-    return true;
-  }
 }