org.jfree.util.ObjectUtilities Java Examples
The following examples show how to use
org.jfree.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: KeyedObject.java From ccu-historian with GNU General Public License v3.0 | 6 votes |
/** * Tests if this object is equal to another. * * @param obj the other object. * * @return A boolean. */ @Override 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 #2
Source File: MeanAndStandardDeviation.java From ccu-historian with GNU General Public License v3.0 | 6 votes |
/** * Tests this instance for equality with an arbitrary object. * * @param obj the object (<code>null</code> permitted). * * @return A boolean. */ @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof MeanAndStandardDeviation)) { return false; } MeanAndStandardDeviation that = (MeanAndStandardDeviation) obj; if (!ObjectUtilities.equal(this.mean, that.mean)) { return false; } if (!ObjectUtilities.equal( this.standardDeviation, that.standardDeviation) ) { return false; } return true; }
Example #3
Source File: JFreeChartEntity.java From ccu-historian with GNU General Public License v3.0 | 6 votes |
/** * Tests the entity for equality with an arbitrary object. * * @param obj the object to test against (<code>null</code> permitted). * * @return A boolean. */ @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof JFreeChartEntity)) { return false; } JFreeChartEntity that = (JFreeChartEntity) obj; if (!getArea().equals(that.getArea())) { return false; } if (!ObjectUtilities.equal(getToolTipText(), that.getToolTipText())) { return false; } if (!ObjectUtilities.equal(getURLText(), that.getURLText())) { return false; } if (!(this.chart.equals(that.chart))) { return false; } return true; }
Example #4
Source File: Series.java From ccu-historian with GNU General Public License v3.0 | 6 votes |
/** * Tests the series for equality with another object. * * @param obj the object (<code>null</code> permitted). * * @return <code>true</code> or <code>false</code>. */ @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; }
Example #5
Source File: StrokeMap.java From opensim-gui with Apache License 2.0 | 6 votes |
/** * Tests this map 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 StrokeMap)) { return false; } StrokeMap that = (StrokeMap) obj; if (this.store.size() != that.store.size()) { return false; } Set keys = this.store.keySet(); Iterator iterator = keys.iterator(); while (iterator.hasNext()) { Comparable key = (Comparable) iterator.next(); Stroke s1 = getStroke(key); Stroke s2 = that.getStroke(key); if (!ObjectUtilities.equal(s1, s2)) { return false; } } return true; }
Example #6
Source File: DefaultKeyedValueDataset.java From ECG-Viewer with GNU General Public License v2.0 | 6 votes |
/** * Tests this dataset for equality with an arbitrary object. * * @param obj the object (<code>null</code> permitted). * * @return A boolean. */ @Override 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 #7
Source File: DefaultTableXYDataset.java From opensim-gui with Apache License 2.0 | 6 votes |
/** * Tests this collection 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 DefaultTableXYDataset)) { return false; } DefaultTableXYDataset that = (DefaultTableXYDataset) obj; if (this.autoPrune != that.autoPrune) { return false; } if (this.propagateEvents != that.propagateEvents) { return false; } if (!this.intervalDelegate.equals(that.intervalDelegate)) { return false; } if (!ObjectUtilities.equal(this.data, that.data)) { return false; } return true; }
Example #8
Source File: StandardXYZToolTipGenerator.java From openstock with GNU General Public License v3.0 | 6 votes |
/** * Tests this object for equality with an arbitrary object. * * @param obj the other object (<code>null</code> permitted). * * @return A boolean. */ @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof StandardXYZToolTipGenerator)) { return false; } if (!super.equals(obj)) { return false; } StandardXYZToolTipGenerator that = (StandardXYZToolTipGenerator) obj; if (!ObjectUtilities.equal(this.zFormat, that.zFormat)) { return false; } if (!ObjectUtilities.equal(this.zDateFormat, that.zDateFormat)) { return false; } return true; }
Example #9
Source File: CombinedRangeCategoryPlot.java From buffer_bci with GNU General Public License v3.0 | 6 votes |
/** * Returns a clone of the plot. * * @return A clone. * * @throws CloneNotSupportedException this class will not throw this * exception, but subclasses (if any) might. */ @Override 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 #10
Source File: CloneUtils.java From ccu-historian with GNU General Public License v3.0 | 6 votes |
/** * Returns a new map that contains the same keys and cloned copied of the * values. * * @param source the source map (<code>null</code> not permitted). * * @return A new map. * * @since 1.0.18 */ public static Map cloneMapValues(Map source) { ParamChecks.nullNotPermitted(source, "source"); Map result = new HashMap(); for (Object key : source.keySet()) { Object value = source.get(key); if (value != null) { try { result.put(key, ObjectUtilities.clone(value)); } catch (CloneNotSupportedException ex) { throw new RuntimeException(ex); } } else { result.put(key, null); } } return result; }
Example #11
Source File: StandardCategoryURLGenerator.java From ECG-Viewer with GNU General Public License v2.0 | 6 votes |
/** * Tests the generator for equality with an arbitrary object. * * @param obj the object (<code>null</code> permitted). * * @return A boolean. */ @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof StandardCategoryURLGenerator)) { return false; } StandardCategoryURLGenerator that = (StandardCategoryURLGenerator) obj; if (!ObjectUtilities.equal(this.prefix, that.prefix)) { return false; } if (!ObjectUtilities.equal(this.seriesParameterName, that.seriesParameterName)) { return false; } if (!ObjectUtilities.equal(this.categoryParameterName, that.categoryParameterName)) { return false; } return true; }
Example #12
Source File: CloneUtils.java From buffer_bci with GNU General Public License v3.0 | 6 votes |
/** * Returns a list containing cloned copies of the items in the source * list. * * @param source the source list (<code>null</code> not permitted). * * @return A new list. */ public static List<?> cloneList(List<?> source) { ParamChecks.nullNotPermitted(source, "source"); List result = new ArrayList(); for (Object obj: source) { if (obj != null) { try { result.add(ObjectUtilities.clone(obj)); } catch (CloneNotSupportedException ex) { throw new RuntimeException(ex); } } else { result.add(null); } } return result; }
Example #13
Source File: StandardPieURLGenerator.java From buffer_bci with GNU General Public License v3.0 | 6 votes |
/** * Tests if this object is equal to another. * * @param obj the object ({@code null} permitted). * * @return A boolean. */ @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof StandardPieURLGenerator)) { return false; } StandardPieURLGenerator that = (StandardPieURLGenerator) obj; if (!this.prefix.equals(that.prefix)) { return false; } if (!this.categoryParamName.equals(that.categoryParamName)) { return false; } if (!ObjectUtilities.equal(this.indexParamName, that.indexParamName)) { return false; } return true; }
Example #14
Source File: AxisEntity.java From buffer_bci with GNU General Public License v3.0 | 6 votes |
/** * Tests the entity for equality with an arbitrary object. * * @param obj the object to test against (<code>null</code> permitted). * * @return A boolean. */ @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof AxisEntity)) { return false; } AxisEntity that = (AxisEntity) obj; if (!getArea().equals(that.getArea())) { return false; } if (!ObjectUtilities.equal(getToolTipText(), that.getToolTipText())) { return false; } if (!ObjectUtilities.equal(getURLText(), that.getURLText())) { return false; } if (!(this.axis.equals(that.axis))) { return false; } return true; }
Example #15
Source File: BubbleXYItemLabelGenerator.java From opensim-gui with Apache License 2.0 | 6 votes |
/** * 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 BubbleXYItemLabelGenerator)) { return false; } if (!super.equals(obj)) { return false; } BubbleXYItemLabelGenerator that = (BubbleXYItemLabelGenerator) obj; if (!ObjectUtilities.equal(this.zFormat, that.zFormat)) { return false; } if (!ObjectUtilities.equal(this.zDateFormat, that.zDateFormat)) { return false; } return true; }
Example #16
Source File: CombinedRangeCategoryPlot.java From SIMVA-SoS with Apache License 2.0 | 6 votes |
/** * Returns a clone of the plot. * * @return A clone. * * @throws CloneNotSupportedException this class will not throw this * exception, but subclasses (if any) might. */ @Override 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 #17
Source File: TimeSeriesCollection.java From buffer_bci with GNU General Public License v3.0 | 6 votes |
/** * Tests this time series collection for equality with another object. * * @param obj the other object. * * @return A boolean. */ @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof TimeSeriesCollection)) { return false; } TimeSeriesCollection that = (TimeSeriesCollection) obj; if (this.xPosition != that.xPosition) { return false; } if (this.domainIsPointsInTime != that.domainIsPointsInTime) { return false; } if (!ObjectUtilities.equal(this.data, that.data)) { return false; } return true; }
Example #18
Source File: LineBorder.java From buffer_bci with GNU General Public License v3.0 | 6 votes |
/** * Tests this border for equality with an arbitrary instance. * * @param obj the object ({@code null} permitted). * * @return A boolean. */ @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof LineBorder)) { return false; } LineBorder that = (LineBorder) obj; if (!PaintUtilities.equal(this.paint, that.paint)) { return false; } if (!ObjectUtilities.equal(this.stroke, that.stroke)) { return false; } if (!this.insets.equals(that.insets)) { return false; } return true; }
Example #19
Source File: KeyToGroupMap.java From buffer_bci with GNU General Public License v3.0 | 6 votes |
/** * Tests the map for equality against an arbitrary object. * * @param obj the object to test against (<code>null</code> permitted). * * @return A boolean. */ @Override 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 #20
Source File: XYDataItem.java From ccu-historian with GNU General Public License v3.0 | 6 votes |
/** * Tests if this object is equal to another. * * @param obj the object to test against for equality (<code>null</code> * permitted). * * @return A boolean. */ @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof XYDataItem)) { return false; } XYDataItem that = (XYDataItem) obj; if (!this.x.equals(that.x)) { return false; } if (!ObjectUtilities.equal(this.y, that.y)) { return false; } return true; }
Example #21
Source File: Tick.java From buffer_bci with GNU General Public License v3.0 | 6 votes |
/** * Tests this tick for equality with an arbitrary object. * * @param obj the object (<code>null</code> permitted). * * @return A boolean. */ @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj instanceof Tick) { Tick t = (Tick) obj; if (!ObjectUtilities.equal(this.text, t.text)) { return false; } if (!ObjectUtilities.equal(this.textAnchor, t.textAnchor)) { return false; } if (!ObjectUtilities.equal(this.rotationAnchor, t.rotationAnchor)) { return false; } if (!(this.angle == t.angle)) { return false; } return true; } return false; }
Example #22
Source File: HistogramDataset.java From opensim-gui with Apache License 2.0 | 6 votes |
/** * Tests this dataset 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 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; }
Example #23
Source File: LineBorder.java From buffer_bci with GNU General Public License v3.0 | 6 votes |
/** * Tests this border for equality with an arbitrary instance. * * @param obj the object ({@code null} permitted). * * @return A boolean. */ @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof LineBorder)) { return false; } LineBorder that = (LineBorder) obj; if (!PaintUtilities.equal(this.paint, that.paint)) { return false; } if (!ObjectUtilities.equal(this.stroke, that.stroke)) { return false; } if (!this.insets.equals(that.insets)) { return false; } return true; }
Example #24
Source File: StatisticalLineAndShapeRenderer.java From ECG-Viewer with GNU General Public License v2.0 | 6 votes |
/** * Tests this renderer for equality with an arbitrary object. * * @param obj the object (<code>null</code> permitted). * * @return A boolean. */ @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof StatisticalLineAndShapeRenderer)) { return false; } StatisticalLineAndShapeRenderer that = (StatisticalLineAndShapeRenderer) obj; if (!PaintUtilities.equal(this.errorIndicatorPaint, that.errorIndicatorPaint)) { return false; } if (!ObjectUtilities.equal(this.errorIndicatorStroke, that.errorIndicatorStroke)) { return false; } return super.equals(obj); }
Example #25
Source File: LegendItemEntity.java From SIMVA-SoS with Apache License 2.0 | 6 votes |
/** * Tests this object for equality with an arbitrary object. * * @param obj the object (<code>null</code> permitted). * * @return A boolean. */ @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof LegendItemEntity)) { return false; } LegendItemEntity that = (LegendItemEntity) obj; if (!ObjectUtilities.equal(this.seriesKey, that.seriesKey)) { return false; } if (this.seriesIndex != that.seriesIndex) { return false; } if (!ObjectUtilities.equal(this.dataset, that.dataset)) { return false; } return super.equals(obj); }
Example #26
Source File: PlotEntity.java From buffer_bci with GNU General Public License v3.0 | 6 votes |
/** * Tests the entity for equality with an arbitrary object. * * @param obj the object to test against (<code>null</code> permitted). * * @return A boolean. */ @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof PlotEntity)) { return false; } PlotEntity that = (PlotEntity) obj; if (!getArea().equals(that.getArea())) { return false; } if (!ObjectUtilities.equal(getToolTipText(), that.getToolTipText())) { return false; } if (!ObjectUtilities.equal(getURLText(), that.getURLText())) { return false; } if (!(this.plot.equals(that.plot))) { return false; } return true; }
Example #27
Source File: CombinedDomainXYPlot.java From ccu-historian with GNU General Public License v3.0 | 6 votes |
/** * Tests this plot for equality with another object. * * @param obj the other object. * * @return <code>true</code> or <code>false</code>. */ @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof CombinedDomainXYPlot)) { return false; } CombinedDomainXYPlot that = (CombinedDomainXYPlot) obj; if (this.gap != that.gap) { return false; } if (!ObjectUtilities.equal(this.subplots, that.subplots)) { return false; } return super.equals(obj); }
Example #28
Source File: StandardXYZToolTipGenerator.java From ccu-historian with GNU General Public License v3.0 | 6 votes |
/** * Tests this object for equality with an arbitrary object. * * @param obj the other object (<code>null</code> permitted). * * @return A boolean. */ @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof StandardXYZToolTipGenerator)) { return false; } if (!super.equals(obj)) { return false; } StandardXYZToolTipGenerator that = (StandardXYZToolTipGenerator) obj; if (!ObjectUtilities.equal(this.zFormat, that.zFormat)) { return false; } if (!ObjectUtilities.equal(this.zDateFormat, that.zDateFormat)) { return false; } return true; }
Example #29
Source File: StatisticalLineAndShapeRenderer.java From SIMVA-SoS with Apache License 2.0 | 6 votes |
/** * Tests this renderer for equality with an arbitrary object. * * @param obj the object (<code>null</code> permitted). * * @return A boolean. */ @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof StatisticalLineAndShapeRenderer)) { return false; } StatisticalLineAndShapeRenderer that = (StatisticalLineAndShapeRenderer) obj; if (!PaintUtilities.equal(this.errorIndicatorPaint, that.errorIndicatorPaint)) { return false; } if (!ObjectUtilities.equal(this.errorIndicatorStroke, that.errorIndicatorStroke)) { return false; } return super.equals(obj); }
Example #30
Source File: ComparableObjectSeries.java From SIMVA-SoS with Apache License 2.0 | 5 votes |
/** * 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. */ @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; }