]> gitweb.fperrin.net Git - Dictionary.git/blob - jars/icu4j-4_4_2-src/main/tests/core/src/com/ibm/icu/dev/test/util/Equator.java
go
[Dictionary.git] / jars / icu4j-4_4_2-src / main / tests / core / src / com / ibm / icu / dev / test / util / Equator.java
1 /*\r
2  *******************************************************************************\r
3  * Copyright (C) 2002-2004, International Business Machines Corporation and    *\r
4  * others. All Rights Reserved.                                                *\r
5  *******************************************************************************\r
6  */\r
7 package com.ibm.icu.dev.test.util;\r
8 \r
9 public interface Equator {\r
10     /**\r
11       * Comparator function. If overridden, must handle case of null,\r
12       * and compare any two objects that could be compared.\r
13       * Must obey normal rules of symmetry: a=b => b=a\r
14       * and transitivity: a=b & b=c => a=b)\r
15       * @param a\r
16       * @param b\r
17       * @return true if a and b are equal\r
18       */\r
19      public boolean isEqual(Object a, Object b);\r
20 \r
21     /**\r
22      * Must obey normal rules: a=b => getHashCode(a)=getHashCode(b)\r
23      * @param object\r
24      * @return a hash code for the object\r
25      */\r
26     public int getHashCode(Object object);\r
27 }