public class Int implements OrderableElement { private int n; public Int(int n) { this.n = n; } public boolean elEquals(Element y) { // Element interface return y instanceof Int && ((Int)y).n == this.n; } public boolean elLessThan(Element y) { return y instanceof Int && this.n < ((Int)y).n; } public boolean elGreaterThan(Element y) { return y instanceof Int && this.n > ((Int)y).n; } public Set belongsTo() { return null; } public String toString() { return ""+n; } }