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:org.trade.strategy.data.BollingerBandsDataset.java

/**
 * Tests this instance for equality with an arbitrary object.
 * //from ww w.ja  va  2s.  co 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 BollingerBandsDataset)) {
        return false;
    }
    BollingerBandsDataset that = (BollingerBandsDataset) obj;
    if (!this.xPosition.equals(that.xPosition)) {
        return false;
    }
    return ObjectUtilities.equal(this.data, that.data);
}

From source file:org.trade.strategy.data.VolumeDataset.java

/**
 * Tests this instance for equality with an arbitrary object.
 * /*from w  w w. j  a v  a2 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 VolumeDataset)) {
        return false;
    }
    VolumeDataset that = (VolumeDataset) obj;
    if (!this.xPosition.equals(that.xPosition)) {
        return false;
    }
    return ObjectUtilities.equal(this.data, that.data);
}

From source file:org.jfree.data.time.TimePeriodValues.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>.
 *//*w  w  w. j  a  va2s . c  o m*/
@Override
public boolean equals(Object obj) {
    if (obj == this) {
        return true;
    }
    if (!(obj instanceof TimePeriodValues)) {
        return false;
    }
    if (!super.equals(obj)) {
        return false;
    }
    TimePeriodValues that = (TimePeriodValues) obj;
    if (!ObjectUtilities.equal(this.getDomainDescription(), that.getDomainDescription())) {
        return false;
    }
    if (!ObjectUtilities.equal(this.getRangeDescription(), that.getRangeDescription())) {
        return false;
    }
    int count = getItemCount();
    if (count != that.getItemCount()) {
        return false;
    }
    for (int i = 0; i < count; i++) {
        if (!getDataItem(i).equals(that.getDataItem(i))) {
            return false;
        }
    }
    return true;
}

From source file:org.jfree.data.time.ohlc.OHLCSeriesCollection.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 va 2  s  .  co  m*/
 */
@Override
public boolean equals(Object obj) {
    if (obj == this) {
        return true;
    }
    if (!(obj instanceof OHLCSeriesCollection)) {
        return false;
    }
    OHLCSeriesCollection that = (OHLCSeriesCollection) obj;
    if (!this.xPosition.equals(that.xPosition)) {
        return false;
    }
    return ObjectUtilities.equal(this.data, that.data);
}

From source file:org.jfree.data.ComparableObjectSeries.java

/**
 * Tests this series for equality with an arbitrary object.
 *
 * @param obj  the object to test against for equality
 *             (<code>null</code> permitted).
 *
 * @return A boolean./*from  www .j  a va 2  s. c o  m*/
 */
@Override
public boolean equals(Object obj) {
    if (obj == this) {
        return true;
    }
    if (!(obj instanceof ComparableObjectSeries)) {
        return false;
    }
    if (!super.equals(obj)) {
        return false;
    }
    ComparableObjectSeries that = (ComparableObjectSeries) obj;
    if (this.maximumItemCount != that.maximumItemCount) {
        return false;
    }
    if (this.autoSort != that.autoSort) {
        return false;
    }
    if (this.allowDuplicateXValues != that.allowDuplicateXValues) {
        return false;
    }
    if (!ObjectUtilities.equal(this.data, that.data)) {
        return false;
    }
    return true;
}

From source file:org.trade.strategy.data.HeikinAshiDataset.java

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

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

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

From source file:org.jfree.data.time.TimePeriodValuesCollection.java

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

From source file:org.jfree.experimental.chart.plot.dial.DialPlot.java

/**
 * Tests this <code>DialPlot</code> instance for equality with an 
 * arbitrary object.  The plot's dataset(s) is (are) not included in 
 * the test./*from   w  w w . j a  v  a 2s  .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 DialPlot)) {
        return false;
    }
    DialPlot that = (DialPlot) obj;
    if (!ObjectUtilities.equal(this.background, that.background)) {
        return false;
    }
    if (!ObjectUtilities.equal(this.cap, that.cap)) {
        return false;
    }
    if (!this.dialFrame.equals(that.dialFrame)) {
        return false;
    }
    if (this.viewX != that.viewX) {
        return false;
    }
    if (this.viewY != that.viewY) {
        return false;
    }
    if (this.viewW != that.viewW) {
        return false;
    }
    if (this.viewH != that.viewH) {
        return false;
    }
    if (!this.layers.equals(that.layers)) {
        return false;
    }
    return super.equals(obj);
}

From source file:org.jfree.data.statistics.HistogramDataset.java

/**
 * Tests this dataset for equality with an arbitrary object.
 *
 * @param obj  the object to test against (<code>null</code> permitted).
 *
 * @return A boolean.//ww  w  .j  a v  a  2 s.  c  o m
 */
@Override
public boolean equals(Object obj) {
    if (obj == this) {
        return true;
    }
    if (!(obj instanceof HistogramDataset)) {
        return false;
    }
    HistogramDataset that = (HistogramDataset) obj;
    if (!ObjectUtilities.equal(this.type, that.type)) {
        return false;
    }
    if (!ObjectUtilities.equal(this.list, that.list)) {
        return false;
    }
    return true;
}