1package ds.util;
2
3
4
5
6public
7 class E implements Comparable<E> {
8
9 private int value;
10
11 private E(int v) {
12 value = v;
13 }
14
15 public int compareTo(E e2) {
16 if (value == e2.value)
17 return 0;
18 if (value > e2.value)
19 return 1;
20 else
21 return -1;
22 }
23
24 public boolean equalTo(E e2) {
25 return
26 compareTo(e2) == 0;
27 }
28
29 public String toString() {
30 return
31 "" + value;
32 }
33
34 public static E mkE(int v) {
35 return
36 new E(v);
37 }
38}