Example usage for org.jfree.util ObjectUtilities equal

List of usage examples for org.jfree.util ObjectUtilities equal

Introduction

In this page you can find the example usage for org.jfree.util ObjectUtilities equal.

Prototype

public static boolean equal(final Object o1, final Object o2) 

Source Link

Document

Returns true if the two objects are equal OR both null.

Usage

From source file:edu.scripps.fl.curves.plot.MyXYErrorRenderer.java

public boolean equals(Object obj) {
    if (obj == this)
        return true;
    if (!(obj instanceof MyXYErrorRenderer))
        return false;
    MyXYErrorRenderer that = (MyXYErrorRenderer) obj;
    if (capLength != that.capLength)
        return false;
    if (!PaintUtilities.equal(errorPaint, that.errorPaint))
        return false;
    if (!ObjectUtilities.equal(errorStroke, that.errorStroke))
        return false;
    else/*from w w  w .  ja va 2s  .  co m*/
        return super.equals(obj);
}

From source file:edu.ucla.stat.SOCR.motionchart.MotionToolTipGenerator.java

/**
 * Tests this object for equality with an arbitrary object.
 *
 * @param obj the other object (<code>null</code> permitted).
 * @return A boolean.// ww w  . jav a  2 s  .  co  m
 */
@Override
public boolean equals(Object obj) {
    if (obj == this) {
        return true;
    }
    if (!(obj instanceof StandardXYZToolTipGenerator)) {
        return false;
    }
    if (!super.equals(obj)) {
        return false;
    }
    MotionToolTipGenerator that = (MotionToolTipGenerator) obj;
    if (!ObjectUtilities.equal(this.keyFormat, that.keyFormat)) {
        return false;
    }
    if (!ObjectUtilities.equal(this.keyDateFormat, that.keyDateFormat)) {
        return false;
    }
    if (!ObjectUtilities.equal(this.colorFormat, that.colorFormat)) {
        return false;
    }
    if (!ObjectUtilities.equal(this.colorDateFormat, that.colorDateFormat)) {
        return false;
    }
    return true;
}

From source file:org.jfree.data.general.Series.java

/**
 * Tests the series for equality with another object.
 *
 * @param obj  the object (<code>null</code> permitted).
 *
 * @return <code>true</code> or <code>false</code>.
 *//*from   w  w  w .j a v a  2 s .  c  o  m*/
@Override
public boolean equals(Object obj) {
    if (obj == this) {
        return true;
    }
    if (!(obj instanceof Series)) {
        return false;
    }
    Series that = (Series) obj;
    if (!getKey().equals(that.getKey())) {
        return false;
    }
    if (!ObjectUtilities.equal(getDescription(), that.getDescription())) {
        return false;
    }
    return true;
}

From source file:net.sf.maltcms.chromaui.annotations.XYSelectableShapeAnnotation.java

/**
 * Tests this annotation for equality with an arbitrary object.
 *
 * @param obj the object ( <code>null</code> permitted).
 *
 * @return A boolean.//from   w  w w .j  a  va2  s  .  c  om
 */
@Override
public boolean equals(Object obj) {
    if (obj == this) {
        return true;
    }
    // now try to reject equality
    if (!super.equals(obj)) {
        return false;
    }
    if (!(obj instanceof XYShapeAnnotation)) {
        return false;
    }
    XYSelectableShapeAnnotation that = (XYSelectableShapeAnnotation) obj;
    if (!this.s.equals(that.s)) {
        return false;
    }
    if (!ObjectUtilities.equal(this.stroke, that.stroke)) {
        return false;
    }
    if (!PaintUtilities.equal(this.outline, that.outline)) {
        return false;
    }
    if (!PaintUtilities.equal(this.highlight, that.highlight)) {
        return false;
    }
    // seem to be the same
    return true;
}

From source file:org.jfree.data.xy.VectorSeriesCollection.java

/**
 * Tests this instance for equality with an arbitrary object.
 *
 * @param obj  the object (<code>null</code> permitted).
 *
 * @return A boolean.//from   w  ww.  j  a  va 2 s.  c om
 */
@Override
public boolean equals(Object obj) {
    if (obj == this) {
        return true;
    }
    if (!(obj instanceof VectorSeriesCollection)) {
        return false;
    }
    VectorSeriesCollection that = (VectorSeriesCollection) obj;
    return ObjectUtilities.equal(this.data, that.data);
}

From source file:vteaexploration.XYPolygonAnnotation.java

/**
 * Tests this annotation for equality with an arbitrary object.
 *
 * @param obj the object (null permitted).
 *
 * @return A boolean./*from  w w w . j ava  2s.  c  o  m*/
 */
public boolean equals(Object obj) {
    if (obj == this) {
        return true;
    }
    // now try to reject equality
    if (!super.equals(obj)) {
        return false;
    }
    if (!(obj instanceof XYPolygonAnnotation)) {
        return false;
    }
    XYPolygonAnnotation that = (XYPolygonAnnotation) obj;
    if (!Arrays.equals(this.polygon, that.polygon)) {
        return false;
    }
    if (!ObjectUtilities.equal(this.stroke, that.stroke)) {
        return false;
    }
    if (!PaintUtilities.equal(this.outlinePaint, that.outlinePaint)) {
        return false;
    }
    if (!PaintUtilities.equal(this.fillPaint, that.fillPaint)) {
        return false;
    }
    // seem to be the same
    return true;
}

From source file:org.jfree.data.xy.YIntervalSeriesCollection.java

/**
 * Tests this instance for equality with an arbitrary object.
 *
 * @param obj  the object (<code>null</code> permitted).
 *
 * @return A boolean.//from   w  w  w  .j a v  a2s . c o  m
 */
@Override
public boolean equals(Object obj) {
    if (obj == this) {
        return true;
    }
    if (!(obj instanceof YIntervalSeriesCollection)) {
        return false;
    }
    YIntervalSeriesCollection that = (YIntervalSeriesCollection) obj;
    return ObjectUtilities.equal(this.data, that.data);
}

From source file:org.jfree.data.xy.XIntervalSeriesCollection.java

/**
 * Tests this instance for equality with an arbitrary object.
 *
 * @param obj  the object (<code>null</code> permitted).
 *
 * @return A boolean./*www  .ja  v a2  s.com*/
 */
@Override
public boolean equals(Object obj) {
    if (obj == this) {
        return true;
    }
    if (!(obj instanceof XIntervalSeriesCollection)) {
        return false;
    }
    XIntervalSeriesCollection that = (XIntervalSeriesCollection) obj;
    return ObjectUtilities.equal(this.data, that.data);
}

From source file:org.jfree.experimental.chart.annotations.XYTitleAnnotation.java

/**
 * Tests this object for equality with an arbitrary object.
 * /*  w w w .j  ava2  s . c  o m*/
 * @param obj  the object (<code>null</code> permitted).
 * 
 * @return A boolean.
 */
public boolean equals(Object obj) {
    if (obj == this) {
        return true;
    }
    if (!(obj instanceof XYTitleAnnotation)) {
        return false;
    }
    XYTitleAnnotation that = (XYTitleAnnotation) obj;
    if (this.coordinateType != that.coordinateType) {
        return false;
    }
    if (this.x != that.x) {
        return false;
    }
    if (this.y != that.y) {
        return false;
    }
    if (this.maxWidth != that.maxWidth) {
        return false;
    }
    if (this.maxHeight != that.maxHeight) {
        return false;
    }
    if (!ObjectUtilities.equal(this.title, that.title)) {
        return false;
    }
    if (!this.anchor.equals(that.anchor)) {
        return false;
    }
    return super.equals(obj);
}

From source file:org.jfree.data.xy.XYIntervalSeriesCollection.java

/**
 * Tests this instance for equality with an arbitrary object.
 *
 * @param obj  the object (<code>null</code> permitted).
 *
 * @return A boolean.//w ww .  j a  v  a2  s.  c om
 */
@Override
public boolean equals(Object obj) {
    if (obj == this) {
        return true;
    }
    if (!(obj instanceof XYIntervalSeriesCollection)) {
        return false;
    }
    XYIntervalSeriesCollection that = (XYIntervalSeriesCollection) obj;
    return ObjectUtilities.equal(this.data, that.data);
}