org.jfree.chart.util.ObjectUtilities Java Examples

The following examples show how to use org.jfree.chart.util.ObjectUtilities. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: Series.java    From astor with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Tests the series for equality with another object.
 *
 * @param obj  the object (<code>null</code> permitted).
 *
 * @return <code>true</code> or <code>false</code>.
 */
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;
}
 
Example #2
Source File: ComparableObjectSeries.java    From astor with GNU General Public License v2.0 6 votes vote down vote up
/**
 * 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.
 */
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;
}
 
Example #3
Source File: Cardumen_00197_t.java    From coming with MIT License 6 votes vote down vote up
/**
 * 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.
 */
public boolean equals(Object obj) {
    if (obj == this) {
        return true;
    }
    if (!(obj instanceof XYSeries)) {
        return false;
    }
    if (!super.equals(obj)) {
        return false;
    }
    XYSeries that = (XYSeries) 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;
}
 
Example #4
Source File: KeyToGroupMap.java    From astor with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Tests the map for equality against an arbitrary object.
 * 
 * @param obj  the object to test against (<code>null</code> permitted).
 * 
 * @return A boolean.
 */
public boolean equals(Object obj) {
    if (obj == this) {
        return true;      
    }
    if (!(obj instanceof KeyToGroupMap)) {
        return false;
    }
    KeyToGroupMap that = (KeyToGroupMap) obj;
    if (!ObjectUtilities.equal(this.defaultGroup, that.defaultGroup)) {
        return false;
    }
    if (!this.keyToGroupMap.equals(that.keyToGroupMap)) {
        return false;
    }
    return true;
}
 
Example #5
Source File: DialPlot.java    From astor with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Returns a hash code for this instance.
 * 
 * @return The hash code.
 */
public int hashCode() {
    int result = 193;
    result = 37 * result + ObjectUtilities.hashCode(this.background);
    result = 37 * result + ObjectUtilities.hashCode(this.cap);
    result = 37 * result + this.dialFrame.hashCode();
    long temp = Double.doubleToLongBits(this.viewX);
    result = 37 * result + (int) (temp ^ (temp >>> 32));
    temp = Double.doubleToLongBits(this.viewY);
    result = 37 * result + (int) (temp ^ (temp >>> 32));
    temp = Double.doubleToLongBits(this.viewW);
    result = 37 * result + (int) (temp ^ (temp >>> 32));
    temp = Double.doubleToLongBits(this.viewH);
    result = 37 * result + (int) (temp ^ (temp >>> 32));
    return result;
}
 
Example #6
Source File: JGenProg2017_0050_s.java    From coming with MIT License 6 votes vote down vote up
/**
 * 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.
 */
public boolean equals(Object obj) {
    if (obj == this) {
        return true;
    }
    if (!(obj instanceof XYSeries)) {
        return false;
    }
    if (!super.equals(obj)) {
        return false;
    }
    XYSeries that = (XYSeries) 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;
}
 
Example #7
Source File: LabelBlock.java    From astor with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Tests this <code>LabelBlock</code> for equality with an arbitrary 
 * object.
 * 
 * @param obj  the object (<code>null</code> permitted).
 * 
 * @return A boolean.
 */
public boolean equals(Object obj) {
    if (!(obj instanceof LabelBlock)) {
        return false;
    }
    LabelBlock that = (LabelBlock) obj;
    if (!this.text.equals(that.text)) {
        return false;
    }
    if (!this.font.equals(that.font)) {
        return false;
    }
    if (!PaintUtilities.equal(this.paint, that.paint)) {
        return false;
    }
    if (!ObjectUtilities.equal(this.toolTipText, that.toolTipText)) {
        return false;
    }
    if (!ObjectUtilities.equal(this.urlText, that.urlText)) {
        return false;
    }
    return super.equals(obj);
}
 
Example #8
Source File: JGenProg2017_008_s.java    From coming with MIT License 6 votes vote down vote up
/**
 * 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.
 */
public boolean equals(Object obj) {
    if (obj == this) {
        return true;
    }
    if (!(obj instanceof XYSeries)) {
        return false;
    }
    if (!super.equals(obj)) {
        return false;
    }
    XYSeries that = (XYSeries) 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;
}
 
Example #9
Source File: DefaultKeyedValueDataset.java    From astor with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Tests this dataset for equality with an arbitrary object.
 *
 * @param obj  the object.
 *
 * @return A boolean.
 */
public boolean equals(Object obj) {

    if (obj == this) {
        return true;
    }
    if (!(obj instanceof KeyedValueDataset)) {
        return false;
    }
    KeyedValueDataset that = (KeyedValueDataset) obj;
    if (this.data == null) {
        if (that.getKey() != null || that.getValue() != null) {
            return false;
        }
        return true;
    }
    if (!ObjectUtilities.equal(this.data.getKey(), that.getKey())) {
        return false;
    }
    if (!ObjectUtilities.equal(this.data.getValue(), that.getValue())) {
        return false;
    }
    return true;
}
 
Example #10
Source File: IntervalMarker.java    From astor with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Tests the marker for equality with an arbitrary object.
 *
 * @param obj  the object (<code>null</code> permitted).
 *
 * @return A boolean.
 */
public boolean equals(Object obj) {
    if (obj == this) {
        return true;
    }
    if (!(obj instanceof IntervalMarker)) {
        return false;
    }
    if (!super.equals(obj)) {
        return false;
    }
    IntervalMarker that = (IntervalMarker) obj;
    if (this.startValue != that.startValue) {
        return false;
    }
    if (this.endValue != that.endValue) {
        return false;
    }
    if (!ObjectUtilities.equal(this.gradientPaintTransformer,
            that.gradientPaintTransformer)) {
        return false;
    }
    return true;
}
 
Example #11
Source File: CombinedRangeCategoryPlot.java    From astor with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Returns a clone of the plot.
 * 
 * @return A clone.
 * 
 * @throws CloneNotSupportedException  this class will not throw this 
 *         exception, but subclasses (if any) might.
 */
public Object clone() throws CloneNotSupportedException {
    CombinedRangeCategoryPlot result 
        = (CombinedRangeCategoryPlot) super.clone(); 
    result.subplots = (List) ObjectUtilities.deepClone(this.subplots);
    for (Iterator it = result.subplots.iterator(); it.hasNext();) {
        Plot child = (Plot) it.next();
        child.setParent(result);
    }
    
    // after setting up all the subplots, the shared range axis may need 
    // reconfiguring
    ValueAxis rangeAxis = result.getRangeAxis();
    if (rangeAxis != null) {
        rangeAxis.configure();
    }
    
    return result;
}
 
Example #12
Source File: MeterInterval.java    From astor with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Checks this instance for equality with an arbitrary object.
 *
 * @param obj  the object (<code>null</code> permitted).
 *
 * @return A boolean.
 */
public boolean equals(Object obj) {
    if (obj == this) {
        return true;
    }
    if (!(obj instanceof MeterInterval)) {
        return false;
    }
    MeterInterval that = (MeterInterval) obj;
    if (!this.label.equals(that.label)) {
        return false;
    }
    if (!this.range.equals(that.range)) {
        return false;
    }
    if (!PaintUtilities.equal(this.outlinePaint, that.outlinePaint)) {
        return false;
    }
    if (!ObjectUtilities.equal(this.outlineStroke, that.outlineStroke)) {
        return false;
    }
    if (!PaintUtilities.equal(this.backgroundPaint, that.backgroundPaint)) {
        return false;
    }
    return true;
}
 
Example #13
Source File: PlotRenderingInfo.java    From astor with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Tests this instance for equality against an arbitrary object.
 * 
 * @param obj  the object (<code>null</code> permitted).
 * 
 * @return A boolean.
 */
public boolean equals(Object obj) {
    if (this == obj) {
        return true;   
    }
    if (!(obj instanceof PlotRenderingInfo)) {
        return false;
    }
    PlotRenderingInfo that = (PlotRenderingInfo) obj;
    if (!ObjectUtilities.equal(this.dataArea, that.dataArea)) {
        return false;   
    }
    if (!ObjectUtilities.equal(this.plotArea, that.plotArea)) {
        return false;   
    }
    if (!ObjectUtilities.equal(this.subplotInfo, that.subplotInfo)) {
        return false;   
    }
    return true;   
}
 
Example #14
Source File: KeyedObject.java    From astor with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Tests if this object is equal to another.
 *
 * @param obj  the other object.
 *
 * @return A boolean.
 */
public boolean equals(Object obj) {

    if (obj == this) {
        return true;
    }

    if (!(obj instanceof KeyedObject)) {
        return false;
    }
    KeyedObject that = (KeyedObject) obj;
    if (!ObjectUtilities.equal(this.key, that.key)) {
        return false;
    }

    if (!ObjectUtilities.equal(this.object, that.object)) {
        return false;
    }

    return true;
}
 
Example #15
Source File: XYErrorRenderer.java    From astor with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Tests this instance for equality with an arbitrary object.
 *
 * @param obj  the object (<code>null</code> permitted).
 *
 * @return A boolean.
 */
public boolean equals(Object obj) {
    if (obj == this) {
        return true;
    }
    if (!(obj instanceof XYErrorRenderer)) {
        return false;
    }
    XYErrorRenderer that = (XYErrorRenderer) obj;
    if (this.drawXError != that.drawXError) {
        return false;
    }
    if (this.drawYError != that.drawYError) {
        return false;
    }
    if (this.capLength != that.capLength) {
        return false;
    }
    if (!PaintUtilities.equal(this.errorPaint, that.errorPaint)) {
        return false;
    }
    if (!ObjectUtilities.equal(this.errorStroke, that.errorStroke)) {
        return false;
    }
    return super.equals(obj);
}
 
Example #16
Source File: AbstractXYAnnotation.java    From astor with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Tests this annotation for equality with an arbitrary object.
 *
 * @param obj  the object (<code>null</code> permitted).
 *
 * @return A boolean.
 */
public boolean equals(Object obj) {
    if (obj == this) {
        return true;
    }
    if (!(obj instanceof AbstractXYAnnotation)) {
        return false;
    }
    AbstractXYAnnotation that = (AbstractXYAnnotation) obj;
    if (!ObjectUtilities.equal(this.toolTipText, that.toolTipText)) {
        return false;
    }
    if (!ObjectUtilities.equal(this.url, that.url)) {
        return false;
    }
    return true;
}
 
Example #17
Source File: Nopol2017_006_t.java    From coming with MIT License 6 votes vote down vote up
/**
 * 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.
 */
public boolean equals(Object obj) {
    if (obj == this) {
        return true;
    }
    if (!(obj instanceof XYSeries)) {
        return false;
    }
    if (!super.equals(obj)) {
        return false;
    }
    XYSeries that = (XYSeries) 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;
}
 
Example #18
Source File: Elixir_002_s.java    From coming with MIT License 6 votes vote down vote up
/**
 * Tests this arrangement for equality with an arbitrary object.
 *
 * @param obj  the object (<code>null</code> permitted).
 *
 * @return A boolean.
 */
public boolean equals(Object obj) {
    if (obj == this) {
        return true;
    }
    if (!(obj instanceof BorderArrangement)) {
        return false;
    }
    BorderArrangement that = (BorderArrangement) obj;
    if (!ObjectUtilities.equal(this.topBlock, that.topBlock)) {
        return false;
    }
    if (!ObjectUtilities.equal(this.bottomBlock, that.bottomBlock)) {
        return false;
    }
    if (!ObjectUtilities.equal(this.leftBlock, that.leftBlock)) {
        return false;
    }
    if (!ObjectUtilities.equal(this.rightBlock, that.rightBlock)) {
        return false;
    }
    if (!ObjectUtilities.equal(this.centerBlock, that.centerBlock)) {
        return false;
    }
    return true;
}
 
Example #19
Source File: Cardumen_008_t.java    From coming with MIT License 5 votes vote down vote up
/**
 * Tests the series for equality with an arbitrary object.
 *
 * @param obj  the object to test against (<code>null</code> permitted).
 *
 * @return A boolean.
 */
public boolean equals(Object obj) {
    if (obj == this) {
        return true;
    }
    if (!(obj instanceof TimeSeries)) {
        return false;
    }
    TimeSeries that = (TimeSeries) obj;
    if (!ObjectUtilities.equal(getDomainDescription(),
            that.getDomainDescription())) {
        return false;
    }
    if (!ObjectUtilities.equal(getRangeDescription(),
            that.getRangeDescription())) {
        return false;
    }
    if (!ObjectUtilities.equal(this.timePeriodClass,
            that.timePeriodClass)) {
        return false;
    }
    if (getMaximumItemAge() != that.getMaximumItemAge()) {
        return false;
    }
    if (getMaximumItemCount() != that.getMaximumItemCount()) {
        return false;
    }
    int count = getItemCount();
    if (count != that.getItemCount()) {
        return false;
    }
    if (!ObjectUtilities.equal(this.data, that.data)) {
        return false;
    }
    return super.equals(obj);
}
 
Example #20
Source File: JGenProg2017_0083_t.java    From coming with MIT License 5 votes vote down vote up
/**
 * Tests the series for equality with an arbitrary object.
 *
 * @param obj  the object to test against (<code>null</code> permitted).
 *
 * @return A boolean.
 */
public boolean equals(Object obj) {
    if (obj == this) {
        return true;
    }
    if (!(obj instanceof TimeSeries)) {
        return false;
    }
    TimeSeries that = (TimeSeries) obj;
    if (!ObjectUtilities.equal(getDomainDescription(),
            that.getDomainDescription())) {
        return false;
    }
    if (!ObjectUtilities.equal(getRangeDescription(),
            that.getRangeDescription())) {
        return false;
    }
    if (!ObjectUtilities.equal(this.timePeriodClass,
            that.timePeriodClass)) {
        return false;
    }
    if (getMaximumItemAge() != that.getMaximumItemAge()) {
        return false;
    }
    if (getMaximumItemCount() != that.getMaximumItemCount()) {
        return false;
    }
    int count = getItemCount();
    if (count != that.getItemCount()) {
        return false;
    }
    if (!ObjectUtilities.equal(this.data, that.data)) {
        return false;
    }
    return super.equals(obj);
}
 
Example #21
Source File: CyclicNumberAxis.java    From astor with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Tests the axis for equality with another object.
 * 
 * @param obj  the object to test against.
 * 
 * @return A boolean.
 */
public boolean equals(Object obj) {
    if (obj == this) {
        return true;
    }
    if (!(obj instanceof CyclicNumberAxis)) {
        return false;
    }
    if (!super.equals(obj)) {
        return false;
    }
    CyclicNumberAxis that = (CyclicNumberAxis) obj;      
    if (this.period != that.period) {
        return false;
    }
    if (this.offset != that.offset) {
        return false;
    }
    if (!PaintUtilities.equal(this.advanceLinePaint, 
            that.advanceLinePaint)) {
        return false;
    }
    if (!ObjectUtilities.equal(this.advanceLineStroke, 
            that.advanceLineStroke)) {
        return false;
    }
    if (this.advanceLineVisible != that.advanceLineVisible) {
        return false;
    }
    if (this.boundMappedToLastCycle != that.boundMappedToLastCycle) {
        return false;
    }
    return true;
}
 
Example #22
Source File: AbstractXYItemLabelGenerator.java    From astor with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Tests this object for equality with an arbitrary object.
 *
 * @param obj  the other object (<code>null</code> permitted).
 *
 * @return A boolean.
 */
public boolean equals(Object obj) {
    if (obj == this) {
        return true;
    }
    if (!(obj instanceof AbstractXYItemLabelGenerator)) {
        return false;
    }
    AbstractXYItemLabelGenerator that = (AbstractXYItemLabelGenerator) obj;
    if (!this.formatString.equals(that.formatString)) {
        return false;
    }
    if (!ObjectUtilities.equal(this.xFormat, that.xFormat)) {
        return false;
    }
    if (!ObjectUtilities.equal(this.xDateFormat, that.xDateFormat)) {
        return false;
    }
    if (!ObjectUtilities.equal(this.yFormat, that.yFormat)) {
        return false;
    }
    if (!ObjectUtilities.equal(this.yDateFormat, that.yDateFormat)) {
        return false;
    }
    if (!this.nullYString.equals(that.nullYString)) {
        return false;
    }
    return true;
}
 
Example #23
Source File: Cardumen_008_s.java    From coming with MIT License 5 votes vote down vote up
/**
 * Tests the series for equality with an arbitrary object.
 *
 * @param obj  the object to test against (<code>null</code> permitted).
 *
 * @return A boolean.
 */
public boolean equals(Object obj) {
    if (obj == this) {
        return true;
    }
    if (!(obj instanceof TimeSeries)) {
        return false;
    }
    TimeSeries that = (TimeSeries) obj;
    if (!ObjectUtilities.equal(getDomainDescription(),
            that.getDomainDescription())) {
        return false;
    }
    if (!ObjectUtilities.equal(getRangeDescription(),
            that.getRangeDescription())) {
        return false;
    }
    if (!ObjectUtilities.equal(this.timePeriodClass,
            that.timePeriodClass)) {
        return false;
    }
    if (getMaximumItemAge() != that.getMaximumItemAge()) {
        return false;
    }
    if (getMaximumItemCount() != that.getMaximumItemCount()) {
        return false;
    }
    int count = getItemCount();
    if (count != that.getItemCount()) {
        return false;
    }
    if (!ObjectUtilities.equal(this.data, that.data)) {
        return false;
    }
    return super.equals(obj);
}
 
Example #24
Source File: Arja_006_s.java    From coming with MIT License 5 votes vote down vote up
/**
 * Tests the series for equality with an arbitrary object.
 *
 * @param obj  the object to test against (<code>null</code> permitted).
 *
 * @return A boolean.
 */
public boolean equals(Object obj) {
    if (obj == this) {
        return true;
    }
    if (!(obj instanceof TimeSeries)) {
        return false;
    }
    TimeSeries that = (TimeSeries) obj;
    if (!ObjectUtilities.equal(getDomainDescription(),
            that.getDomainDescription())) {
        return false;
    }
    if (!ObjectUtilities.equal(getRangeDescription(),
            that.getRangeDescription())) {
        return false;
    }
    if (!ObjectUtilities.equal(this.timePeriodClass,
            that.timePeriodClass)) {
        return false;
    }
    if (getMaximumItemAge() != that.getMaximumItemAge()) {
        return false;
    }
    if (getMaximumItemCount() != that.getMaximumItemCount()) {
        return false;
    }
    int count = getItemCount();
    if (count != that.getItemCount()) {
        return false;
    }
    if (!ObjectUtilities.equal(this.data, that.data)) {
        return false;
    }
    return super.equals(obj);
}
 
Example #25
Source File: Arja_006_t.java    From coming with MIT License 5 votes vote down vote up
/**
 * Tests the series for equality with an arbitrary object.
 *
 * @param obj  the object to test against (<code>null</code> permitted).
 *
 * @return A boolean.
 */
public boolean equals(Object obj) {
    if (obj == this) {
        return true;
    }
    if (!(obj instanceof TimeSeries)) {
        return false;
    }
    TimeSeries that = (TimeSeries) obj;
    if (!ObjectUtilities.equal(getDomainDescription(),
            that.getDomainDescription())) {
        return false;
    }
    if (!ObjectUtilities.equal(getRangeDescription(),
            that.getRangeDescription())) {
        return false;
    }
    if (!ObjectUtilities.equal(this.timePeriodClass,
            that.timePeriodClass)) {
        return false;
    }
    if (getMaximumItemAge() != that.getMaximumItemAge()) {
        return false;
    }
    if (getMaximumItemCount() != that.getMaximumItemCount()) {
        return false;
    }
    int count = getItemCount();
    if (count != that.getItemCount()) {
        return false;
    }
    if (!ObjectUtilities.equal(this.data, that.data)) {
        return false;
    }
    return super.equals(obj);
}
 
Example #26
Source File: Cardumen_00244_t.java    From coming with MIT License 5 votes vote down vote up
/**
 * Tests the series for equality with an arbitrary object.
 *
 * @param obj  the object to test against (<code>null</code> permitted).
 *
 * @return A boolean.
 */
public boolean equals(Object obj) {
    if (obj == this) {
        return true;
    }
    if (!(obj instanceof TimeSeries)) {
        return false;
    }
    TimeSeries that = (TimeSeries) obj;
    if (!ObjectUtilities.equal(getDomainDescription(),
            that.getDomainDescription())) {
        return false;
    }
    if (!ObjectUtilities.equal(getRangeDescription(),
            that.getRangeDescription())) {
        return false;
    }
    if (!ObjectUtilities.equal(this.timePeriodClass,
            that.timePeriodClass)) {
        return false;
    }
    if (getMaximumItemAge() != that.getMaximumItemAge()) {
        return false;
    }
    if (getMaximumItemCount() != that.getMaximumItemCount()) {
        return false;
    }
    int count = getItemCount();
    if (count != that.getItemCount()) {
        return false;
    }
    if (!ObjectUtilities.equal(this.data, that.data)) {
        return false;
    }
    return super.equals(obj);
}
 
Example #27
Source File: MarkerAxisBand.java    From astor with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Tests this axis for equality with another object.  Note that the axis 
 * that the band belongs to is ignored in the test.
 *
 * @param obj  the object (<code>null</code> permitted).
 *
 * @return <code>true</code> or <code>false</code>.
 */
public boolean equals(Object obj) {
    if (obj == this) {
        return true;
    }
    if (!(obj instanceof MarkerAxisBand)) {
        return false;
    }
    MarkerAxisBand that = (MarkerAxisBand) obj;
    if (this.topOuterGap != that.topOuterGap) {
        return false;
    }
    if (this.topInnerGap != that.topInnerGap) {
        return false;
    }
    if (this.bottomInnerGap != that.bottomInnerGap) {
        return false;
    }
    if (this.bottomOuterGap != that.bottomOuterGap) {
        return false;
    }
    if (!ObjectUtilities.equal(this.font, that.font)) {
        return false;
    }
    if (!ObjectUtilities.equal(this.markers, that.markers)) {
        return false;
    }
    return true;
}
 
Example #28
Source File: Cardumen_00244_s.java    From coming with MIT License 5 votes vote down vote up
/**
 * Tests the series for equality with an arbitrary object.
 *
 * @param obj  the object to test against (<code>null</code> permitted).
 *
 * @return A boolean.
 */
public boolean equals(Object obj) {
    if (obj == this) {
        return true;
    }
    if (!(obj instanceof TimeSeries)) {
        return false;
    }
    TimeSeries that = (TimeSeries) obj;
    if (!ObjectUtilities.equal(getDomainDescription(),
            that.getDomainDescription())) {
        return false;
    }
    if (!ObjectUtilities.equal(getRangeDescription(),
            that.getRangeDescription())) {
        return false;
    }
    if (!ObjectUtilities.equal(this.timePeriodClass,
            that.timePeriodClass)) {
        return false;
    }
    if (getMaximumItemAge() != that.getMaximumItemAge()) {
        return false;
    }
    if (getMaximumItemCount() != that.getMaximumItemCount()) {
        return false;
    }
    int count = getItemCount();
    if (count != that.getItemCount()) {
        return false;
    }
    if (!ObjectUtilities.equal(this.data, that.data)) {
        return false;
    }
    return super.equals(obj);
}
 
Example #29
Source File: Arja_00131_t.java    From coming with MIT License 5 votes vote down vote up
/**
 * Tests this plot for equality with an arbitrary object.  Note that the
 * plot's dataset is not considered in the equality test.
 *
 * @param obj  the object (<code>null</code> permitted).
 *
 * @return <code>true</code> if this plot is equal to <code>obj</code>, and
 *     <code>false</code> otherwise.
 */
public boolean equals(Object obj) {
    if (obj == this) {
        return true;
    }
    if (!(obj instanceof MultiplePiePlot)) {
        return false;
    }
    MultiplePiePlot that = (MultiplePiePlot) obj;
    if (this.dataExtractOrder != that.dataExtractOrder) {
        return false;
    }
    if (this.limit != that.limit) {
        return false;
    }
    if (!this.aggregatedItemsKey.equals(that.aggregatedItemsKey)) {
        return false;
    }
    if (!PaintUtilities.equal(this.aggregatedItemsPaint,
            that.aggregatedItemsPaint)) {
        return false;
    }
    if (!ObjectUtilities.equal(this.pieChart, that.pieChart)) {
        return false;
    }
    if (!super.equals(obj)) {
        return false;
    }
    return true;
}
 
Example #30
Source File: TextAnnotation.java    From astor with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Tests this object for equality with an arbitrary object.
 *
 * @param obj  the object (<code>null</code> permitted).
 *
 * @return <code>true</code> or <code>false</code>.
 */
public boolean equals(Object obj) {
    if (obj == this) {
        return true;
    }
    // now try to reject equality...
    if (!(obj instanceof TextAnnotation)) {
        return false;
    }
    TextAnnotation that = (TextAnnotation) obj;
    if (!ObjectUtilities.equal(this.text, that.getText())) {
        return false;
    }
    if (!ObjectUtilities.equal(this.font, that.getFont())) {
        return false;
    }
    if (!PaintUtilities.equal(this.paint, that.getPaint())) {
        return false;
    }
    if (!ObjectUtilities.equal(this.textAnchor, that.getTextAnchor())) {
        return false;
    }
    if (!ObjectUtilities.equal(this.rotationAnchor,
            that.getRotationAnchor())) {
        return false;
    }
    if (this.rotationAngle != that.getRotationAngle()) {
        return false;
    }

    // seem to be the same...
    return true;

}