/Users/lyon/j4p/src/collections/sortable/Cint.java
|
1 package collections.sortable;
2
3
4 class Cint implements Comparable2 {
5 int i;
6
7 Cint(int a) {
8 i = a;
9 }
10
11 public boolean equals(Object other) {
12 return (i == ((Cint) other).i);
13 }
14
15 public boolean isLess(Object other) {
16 return (i < ((Cint) other).i);
17 }
18
19 public boolean isGreater(Object other) {
20 return (i > ((Cint) other).i);
21 }
22
23 public String toString() {
24 return i + " ";
25 }
26
27 public int hashCode() {
28 return i;
29 }
30
31 }
32