ICU-12716 Add hashCode to avoid compiler warnings

X-SVN-Rev: 39372
This commit is contained in:
Craig Cornelius 2016-09-28 01:13:19 +00:00
parent f6e18517b1
commit e13317152d
3 changed files with 24 additions and 0 deletions

View 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,

View 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() {

View 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