abstract class Comparable {
/** Return whether I am less than other? */
abstract boolean lessThan(Comparable other);
/** Return whether I am less than or equal to other? */
boolean lessThanOrEqual (Comparable other){
return (this.lessThan(other) || this.equals(other));
}
/** Return whether I am greater than other? */
boolean greaterThan (Comparable other){
return (!this.lessThanOrEqual(other));
}
/** Return whether I am greater than or equal to other? */
boolean greaterThanOrEqual(Comparable other){
return (!this.lessThan(other));
}
}