Return a stable value for wacky comparisons.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@1058 6335cc39-0255-0410-8fd6-9bcaacd3b74c
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// $Id: IntTuple.java,v 1.3 2003/02/18 18:22:50 mdb Exp $
|
// $Id: IntTuple.java,v 1.4 2003/02/18 18:30:57 mdb Exp $
|
||||||
//
|
//
|
||||||
// samskivert library - useful routines for java programs
|
// samskivert library - useful routines for java programs
|
||||||
// Copyright (C) 2001 Michael Bayne
|
// Copyright (C) 2001 Michael Bayne
|
||||||
@@ -59,7 +59,7 @@ public class IntTuple
|
|||||||
IntTuple ot = (IntTuple)o;
|
IntTuple ot = (IntTuple)o;
|
||||||
return (left == ot.left) ? (right - ot.right) : (left - ot.left);
|
return (left == ot.left) ? (right - ot.right) : (left - ot.left);
|
||||||
} else {
|
} else {
|
||||||
return -1;
|
return hashCode() - o.hashCode();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user