@Test public void testEquals() { DefaultHeatMapDataset d1 = new DefaultHeatMapDataset(5, 10, 1.0, 2.0, 3.0, 4.0); DefaultHeatMapDataset d2 = new DefaultHeatMapDataset(5, 10, 1.0, 2.0, 3.0, 4.0); assertEquals(d1, d2); d1 = new DefaultHeatMapDataset(6, 10, 1.0, 2.0, 3.0, 4.0); assertFalse(d1.equals(d2)); d2 = new DefaultHeatMapDataset(6, 10, 1.0, 2.0, 3.0, 4.0); assertEquals(d1, d2); d1 = new DefaultHeatMapDataset(6, 11, 1.0, 2.0, 3.0, 4.0); assertFalse(d1.equals(d2)); d2 = new DefaultHeatMapDataset(6, 11, 1.0, 2.0, 3.0, 4.0); assertEquals(d1, d2); d1 = new DefaultHeatMapDataset(6, 11, 2.0, 2.0, 3.0, 4.0); assertFalse(d1.equals(d2)); d2 = new DefaultHeatMapDataset(6, 11, 2.0, 2.0, 3.0, 4.0); assertEquals(d1, d2); d1 = new DefaultHeatMapDataset(6, 11, 2.0, 3.0, 3.0, 4.0); assertFalse(d1.equals(d2)); d2 = new DefaultHeatMapDataset(6, 11, 2.0, 3.0, 3.0, 4.0); assertEquals(d1, d2); d1 = new DefaultHeatMapDataset(6, 11, 2.0, 3.0, 4.0, 4.0); assertFalse(d1.equals(d2)); d2 = new DefaultHeatMapDataset(6, 11, 2.0, 3.0, 4.0, 4.0); assertEquals(d1, d2); d1 = new DefaultHeatMapDataset(6, 11, 2.0, 3.0, 4.0, 5.0); assertFalse(d1.equals(d2)); d2 = new DefaultHeatMapDataset(6, 11, 2.0, 3.0, 4.0, 5.0); assertEquals(d1, d2); d1.setZValue(1, 2, 3.0); assertFalse(d1.equals(d2)); d2.setZValue(1, 2, 3.0); assertEquals(d1, d2); d1.setZValue(0, 0, Double.NEGATIVE_INFINITY); assertFalse(d1.equals(d2)); d2.setZValue(0, 0, Double.NEGATIVE_INFINITY); assertEquals(d1, d2); d1.setZValue(0, 1, Double.POSITIVE_INFINITY); assertFalse(d1.equals(d2)); d2.setZValue(0, 1, Double.POSITIVE_INFINITY); assertEquals(d1, d2); d1.setZValue(0, 2, Double.NaN); assertFalse(d1.equals(d2)); d2.setZValue(0, 2, Double.NaN); assertEquals(d1, d2); }
@Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof DefaultHeatMapDataset)) { return false; } DefaultHeatMapDataset that = (DefaultHeatMapDataset) obj; if (this.xSamples != that.xSamples) { return false; } if (this.ySamples != that.ySamples) { return false; } if (this.minX != that.minX) { return false; } if (this.maxX != that.maxX) { return false; } if (this.minY != that.minY) { return false; } if (this.maxY != that.maxY) { return false; } if (!DataUtilities.equal(this.zValues, that.zValues)) { return false; } return true; }
DefaultHeatMapDataset extends AbstractDataset implements HeatMapDataset, Cloneable, PublicCloneable, Serializable { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof DefaultHeatMapDataset)) { return false; } DefaultHeatMapDataset that = (DefaultHeatMapDataset) obj; if (this.xSamples != that.xSamples) { return false; } if (this.ySamples != that.ySamples) { return false; } if (this.minX != that.minX) { return false; } if (this.maxX != that.maxX) { return false; } if (this.minY != that.minY) { return false; } if (this.maxY != that.maxY) { return false; } if (!DataUtilities.equal(this.zValues, that.zValues)) { return false; } return true; } }
DefaultHeatMapDataset extends AbstractDataset implements HeatMapDataset, Cloneable, PublicCloneable, Serializable { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof DefaultHeatMapDataset)) { return false; } DefaultHeatMapDataset that = (DefaultHeatMapDataset) obj; if (this.xSamples != that.xSamples) { return false; } if (this.ySamples != that.ySamples) { return false; } if (this.minX != that.minX) { return false; } if (this.maxX != that.maxX) { return false; } if (this.minY != that.minY) { return false; } if (this.maxY != that.maxY) { return false; } if (!DataUtilities.equal(this.zValues, that.zValues)) { return false; } return true; } DefaultHeatMapDataset(int xSamples, int ySamples, double minX,
            double maxX, double minY, double maxY); }
DefaultHeatMapDataset extends AbstractDataset implements HeatMapDataset, Cloneable, PublicCloneable, Serializable { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof DefaultHeatMapDataset)) { return false; } DefaultHeatMapDataset that = (DefaultHeatMapDataset) obj; if (this.xSamples != that.xSamples) { return false; } if (this.ySamples != that.ySamples) { return false; } if (this.minX != that.minX) { return false; } if (this.maxX != that.maxX) { return false; } if (this.minY != that.minY) { return false; } if (this.maxY != that.maxY) { return false; } if (!DataUtilities.equal(this.zValues, that.zValues)) { return false; } return true; } DefaultHeatMapDataset(int xSamples, int ySamples, double minX,
            double maxX, double minY, double maxY); @Override int getXSampleCount(); @Override int getYSampleCount(); @Override double getMinimumXValue(); @Override double getMaximumXValue(); @Override double getMinimumYValue(); @Override double getMaximumYValue(); @Override double getXValue(int xIndex); @Override double getYValue(int yIndex); @Override double getZValue(int xIndex, int yIndex); @Override Number getZ(int xIndex, int yIndex); void setZValue(int xIndex, int yIndex, double z); void setZValue(int xIndex, int yIndex, double z, boolean notify); @Override boolean equals(Object obj); @Override Object clone(); }
DefaultHeatMapDataset extends AbstractDataset implements HeatMapDataset, Cloneable, PublicCloneable, Serializable { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof DefaultHeatMapDataset)) { return false; } DefaultHeatMapDataset that = (DefaultHeatMapDataset) obj; if (this.xSamples != that.xSamples) { return false; } if (this.ySamples != that.ySamples) { return false; } if (this.minX != that.minX) { return false; } if (this.maxX != that.maxX) { return false; } if (this.minY != that.minY) { return false; } if (this.maxY != that.maxY) { return false; } if (!DataUtilities.equal(this.zValues, that.zValues)) { return false; } return true; } DefaultHeatMapDataset(int xSamples, int ySamples, double minX,
            double maxX, double minY, double maxY); @Override int getXSampleCount(); @Override int getYSampleCount(); @Override double getMinimumXValue(); @Override double getMaximumXValue(); @Override double getMinimumYValue(); @Override double getMaximumYValue(); @Override double getXValue(int xIndex); @Override double getYValue(int yIndex); @Override double getZValue(int xIndex, int yIndex); @Override Number getZ(int xIndex, int yIndex); void setZValue(int xIndex, int yIndex, double z); void setZValue(int xIndex, int yIndex, double z, boolean notify); @Override boolean equals(Object obj); @Override Object clone();  }