mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-20 20:19:32 +00:00
ICU-8854 Class defines or inherits equals() but not hashCode().
X-SVN-Rev: 30925
This commit is contained in:
parent
f24d42939c
commit
049feaf0a2
12 changed files with 89 additions and 4 deletions
|
@ -587,6 +587,11 @@ public final class CollationElementIterator
|
|||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public int hashCode() {
|
||||
assert false : "hashCode not designed";
|
||||
return 42;
|
||||
}
|
||||
|
||||
// package private constructors ------------------------------------------
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
******************************************************************************
|
||||
* Copyright (C) 1996-2010, International Business Machines Corporation and *
|
||||
* Copyright (C) 1996-2011, International Business Machines Corporation and *
|
||||
* others. All Rights Reserved. *
|
||||
******************************************************************************
|
||||
*/
|
||||
|
@ -226,6 +226,11 @@ public class CharTrie extends Trie
|
|||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public int hashCode() {
|
||||
assert false : "hashCode not designed";
|
||||
return 42;
|
||||
}
|
||||
///CLOVER:ON
|
||||
|
||||
// protected methods -----------------------------------------------
|
||||
|
|
|
@ -815,6 +815,12 @@ public class ICUResourceBundle extends UResourceBundle {
|
|||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public int hashCode() {
|
||||
assert false : "hashCode not designed";
|
||||
return 42;
|
||||
}
|
||||
|
||||
// This method is for super class's instantiateBundle method
|
||||
public static UResourceBundle getBundleInstance(String baseName, String localeID,
|
||||
ClassLoader root, boolean disableFallback){
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
******************************************************************************
|
||||
* Copyright (C) 1996-2010, International Business Machines Corporation and *
|
||||
* Copyright (C) 1996-2011, International Business Machines Corporation and *
|
||||
* others. All Rights Reserved. *
|
||||
******************************************************************************
|
||||
*/
|
||||
|
@ -232,6 +232,11 @@ public class IntTrie extends Trie
|
|||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public int hashCode() {
|
||||
assert false : "hashCode not designed";
|
||||
return 42;
|
||||
}
|
||||
///CLOVER:ON
|
||||
|
||||
// protected methods -----------------------------------------------
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
******************************************************************************
|
||||
* Copyright (C) 1996-2010, International Business Machines Corporation and *
|
||||
* Copyright (C) 1996-2011, International Business Machines Corporation and *
|
||||
* others. All Rights Reserved. *
|
||||
******************************************************************************
|
||||
*/
|
||||
|
@ -108,6 +108,11 @@ public abstract class Trie
|
|||
&& m_dataLength_ == othertrie.m_dataLength_
|
||||
&& Arrays.equals(m_index_, othertrie.m_index_);
|
||||
}
|
||||
|
||||
public int hashCode() {
|
||||
assert false : "hashCode not designed";
|
||||
return 42;
|
||||
}
|
||||
///CLOVER:ON
|
||||
|
||||
/**
|
||||
|
|
|
@ -218,6 +218,11 @@ public class CurrencyPluralInfo implements Cloneable, Serializable {
|
|||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public int hashCode() {
|
||||
assert false : "hashCode not designed";
|
||||
return 42;
|
||||
}
|
||||
|
||||
/**
|
||||
* Given a number, returns the keyword of the first rule that applies
|
||||
|
|
|
@ -549,6 +549,11 @@ final class NFRule {
|
|||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public int hashCode() {
|
||||
assert false : "hashCode not designed";
|
||||
return 42;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a textual representation of the rule. This won't
|
||||
|
|
|
@ -311,6 +311,11 @@ final class NFRuleSet {
|
|||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
public int hashCode() {
|
||||
assert false : "hashCode not designed";
|
||||
return 42;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
|
|
|
@ -269,6 +269,11 @@ abstract class NFSubstitution {
|
|||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public int hashCode() {
|
||||
assert false : "hashCode not designed";
|
||||
return 42;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a textual description of the substitution
|
||||
|
@ -715,6 +720,11 @@ class MultiplierSubstitution extends NFSubstitution {
|
|||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public int hashCode() {
|
||||
assert false : "hashCode not designed";
|
||||
return 42;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
// formatting
|
||||
|
@ -890,6 +900,11 @@ class ModulusSubstitution extends NFSubstitution {
|
|||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public int hashCode() {
|
||||
assert false : "hashCode not designed";
|
||||
return 42;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
// formatting
|
||||
|
@ -1566,6 +1581,11 @@ class NumeratorSubstitution extends NFSubstitution {
|
|||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public int hashCode() {
|
||||
assert false : "hashCode not designed";
|
||||
return 42;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
// formatting
|
||||
|
@ -1770,6 +1790,11 @@ class NullSubstitution extends NFSubstitution {
|
|||
public boolean equals(Object that) {
|
||||
return super.equals(that);
|
||||
}
|
||||
|
||||
public int hashCode() {
|
||||
assert false : "hashCode not designed";
|
||||
return 42;
|
||||
}
|
||||
|
||||
/**
|
||||
* NullSubstitutions don't show up in the textual representation
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
*******************************************************************************
|
||||
* Copyright (C) 2003-2010, International Business Machines Corporation and *
|
||||
* Copyright (C) 2003-2011, International Business Machines Corporation and *
|
||||
* others. All Rights Reserved. *
|
||||
*******************************************************************************
|
||||
*/
|
||||
|
@ -136,6 +136,12 @@ public class StringPrepParseException extends ParseException {
|
|||
return ((StringPrepParseException)other).error == this.error;
|
||||
|
||||
}
|
||||
|
||||
public int hashCode() {
|
||||
assert false : "hashCode not designed";
|
||||
return 42;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the position of error in the rules string
|
||||
*
|
||||
|
|
|
@ -622,6 +622,10 @@ public abstract class StringTrieBuilder {
|
|||
return true;
|
||||
}
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return super.hashCode();
|
||||
}
|
||||
@Override
|
||||
public int markRightEdgesFirst(int edgeNumber) {
|
||||
if(offset==0) {
|
||||
firstEdgeNumber=edgeNumber;
|
||||
|
@ -728,6 +732,10 @@ public abstract class StringTrieBuilder {
|
|||
return unit==o.unit && lessThan==o.lessThan && greaterOrEqual==o.greaterOrEqual;
|
||||
}
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return super.hashCode();
|
||||
}
|
||||
@Override
|
||||
public int markRightEdgesFirst(int edgeNumber) {
|
||||
if(offset==0) {
|
||||
firstEdgeNumber=edgeNumber;
|
||||
|
|
|
@ -369,6 +369,11 @@ public abstract class Transliterator implements StringTransform {
|
|||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public int hashCode() {
|
||||
assert false : "hashCode not designed";
|
||||
return 42;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a string representation of this Position.
|
||||
|
|
Loading…
Add table
Reference in a new issue