]> granicus.if.org Git - icu/commitdiff
ICU-12716 Add hashCode to avoid compiler warnings
authorCraig Cornelius <ccornelius@google.com>
Wed, 28 Sep 2016 01:13:19 +0000 (01:13 +0000)
committerCraig Cornelius <ccornelius@google.com>
Wed, 28 Sep 2016 01:13:19 +0000 (01:13 +0000)
X-SVN-Rev: 39372

icu4j/main/classes/collate/src/com/ibm/icu/impl/coll/CollationIterator.java
icu4j/main/classes/collate/src/com/ibm/icu/text/Collator.java
icu4j/main/classes/core/src/com/ibm/icu/util/VersionInfo.java

index e134b6faa4f9a45fb9c9cf3479d83d9173a1b43f..91051fee9a01a3ed77dbb2ec761b5214a5706657 100644 (file)
@@ -219,6 +219,12 @@ public abstract class CollationIterator {
         return true;
     }
 
+    @Override
+    public int hashCode() {
+        // Dummy return to prevent compile warnings.
+        return 0;
+    }
+
     /**
      * Resets the iterator state and sets the position to the specified offset.
      * Subclasses must implement, and must call the parent class method,
index 65826807531022005d6144df465d7c43b17030d0..286e1b28ec17274e6e4b4b4f6e1765255f88842f 100644 (file)
@@ -321,6 +321,12 @@ public abstract class Collator implements Comparator<Object>, Freezable<Collator
         return this == obj || (obj != null && getClass() == obj.getClass());
     }
 
+    @Override
+    public int hashCode() {
+        // Dummy return to prevent compile warnings.
+        return 0;
+    }
+
     // public setters --------------------------------------------------------
 
     private void checkNotFrozen() {
index 7c89f40f8e60ff9d6251bf8408babecfe3a99428..b844d00aed8660b9de80f868ac89b0de0a493ddc 100644 (file)
@@ -465,6 +465,18 @@ public final class VersionInfo implements Comparable<VersionInfo>
         return other == this;
     }
 
+    /**
+     * Returns the hash code value for this set.
+     *
+     * @return the hash code value for this set.
+     * @see java.lang.Object#hashCode()
+     * @stable ICU 2.0
+     */
+    @Override
+    public int hashCode() {
+        return m_version_;
+    }
+
     /**
      * Compares other with this VersionInfo.
      * @param other VersionInfo to be compared