main/plugins/org.talend.libraries.jfreechart.jars/lib_src/jfreechart-1.0.12/source/org/jfree/data/xy/XYDataItem.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 XYDataItem) {
            XYDataItem dataItem = (XYDataItem) o1;
            double compare = this.x.doubleValue()
                             - dataItem.getX().doubleValue();
            if (compare > 0.0) {
                result = 1;
            }
            else {
                if (compare < 0.0) {
                    result = -1;
                }
                else {
                    result = 0;
                }
            }
        }
        else {
            result = 1;
        }
        return result;
    }
public int compareTo ( Object o1 ) { int result ; if ( o1 instanceof XYDataItem ) { XYDataItem dataItem = ( XYDataItem ) o1 ; double compare = this . x . doubleValue ( ) - dataItem . getX ( ) . doubleValue ( ) ; if ( compare > 0.0 ) { result = 1 ; } else { if ( compare < 0.0 ) { result = - 1 ; } else { result = 0 ; } } } 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 TimeSeriesDataPair object
 // -------------------------------------------------------
 // CASE 2 : Comparing to a general object
 // ---------------------------------------------
 // consider time periods to be ordered after general objects
