afreechart/src/main/java/org/afree/data/ComparableObjectItem.java
/**
     * Returns an integer indicating the order of this object relative to
     * another object.
     * <P>
     * For the order we consider only the x-value:
     * negative == "less-than", zero == "equal", positive == "greater-than".
     *
     * @param o1  the object being compared to.
     *
     * @return An integer indicating the order of this data pair object
     *      relative to another object.
     */
Returns an integer indicating the order of this object relative to
another object.

@param o1  the object being compared to.

@return An integer indicating the order of this data pair object
relative to another object.
Returns an integer indicating the order of this object relative to another object . @param o1 the object being compared to . @return An integer indicating the order of this data pair object relative to another object .
public int compareTo(Object o1) {
        int result;
        if (o1 instanceof ComparableObjectItem) {
            ComparableObjectItem that = (ComparableObjectItem) o1;
            return this.x.compareTo(that.x);
        }
        else {
            result = 1;
        }
        return result;
    }
public int compareTo ( Object o1 ) { int result ; if ( o1 instanceof ComparableObjectItem ) { ComparableObjectItem that = ( ComparableObjectItem ) o1 ; return this . x . compareTo ( that . x ) ; } else { result = 1 ; } return result ; }
Returns an integer indicating the order of this object relative to
 another object.
Returns an integer indicating the order of this object relative to another object .
// CASE 1 : Comparing to another ComparableObjectItem object // --------------------------------------------------------- // CASE 2 : Comparing to a general object // --------------------------------------------- // consider these to be ordered after general objects