01: /*
02: * Created on 03-May-2004
03: *
04: */
05: package com.jofti.btree;
06:
07: /**
08: *
09: * This is a special object in the tree and is used to represent an absolute minimum value for a dimension. <br>
10: * Class cast issues are taken care of in the Value Object class .<p>
11: *
12: * @author Steve Woodcock
13: * @version 1.4<br>
14: */
15: final public class MinComparableValue implements Comparable {
16:
17: /* (non-Javadoc)
18: * @see java.lang.Comparable#compareTo(java.lang.Object)
19: */
20:
21: public MinComparableValue() {
22:
23: }
24:
25: public int compareTo(Object o) {
26: if (o == this ) {
27: return 0;
28: } else {
29: return -1;
30: }
31: }
32:
33: public boolean equals(Object o) {
34: if (o instanceof MinComparableValue) {
35: return true;
36: }
37: return false;
38: }
39:
40: public int hashCode() {
41: // all has to same value
42: return 0;
43: }
44: }
|