01: /*
02: *******************************************************************************
03: * Copyright (C) 2002-2004, International Business Machines Corporation and *
04: * others. All Rights Reserved. *
05: *******************************************************************************
06: */
07: package com.ibm.icu.dev.test.util;
08:
09: public interface Equator {
10: /**
11: * Comparator function. If overridden, must handle case of null,
12: * and compare any two objects that could be compared.
13: * Must obey normal rules of symmetry: a=b => b=a
14: * and transitivity: a=b & b=c => a=b)
15: * @param a
16: * @param b
17: * @return true if a and b are equal
18: */
19: public boolean isEqual(Object a, Object b);
20:
21: /**
22: * Must obey normal rules: a=b => getHashCode(a)=getHashCode(b)
23: * @param object
24: * @return a hash code for the object
25: */
26: public int getHashCode(Object object);
27: }
|