public class IntElement implements Element {
    protected int myInt;

    // Constructor.  Create me with value val.
    // ------------------------------------------------------------------
    public IntElement( int val ) {
        myInt = val;
    }

    // Return me as a String.
    // ------------------------------------------------------------------
    public String toString() {
        return String.valueOf(myInt);
    }

    // Return true iff e has the same value that I do.
    // ------------------------------------------------------------------
    public boolean equals(Element e) {
        return myInt == ((IntElement)e).myInt;
    }

    // Return true iff my value is less than e's value.
    // ------------------------------------------------------------------
    public boolean lessThan(Element e) {
        return myInt < ((IntElement)e).myInt;
    }
}
