@Test public void testCloning() throws CloneNotSupportedException { double start = 10.0; double end = 20.0; HistogramBin b1 = new HistogramBin(start, end); HistogramBin b2 = (HistogramBin) b1.clone(); assertNotSame(b1, b2); assertSame(b1.getClass(), b2.getClass()); assertEquals(b1, b2); }
@Override public Object clone() throws CloneNotSupportedException { return super.clone(); }
HistogramBin implements Cloneable, Serializable { @Override public Object clone() throws CloneNotSupportedException { return super.clone(); } }
HistogramBin implements Cloneable, Serializable { @Override public Object clone() throws CloneNotSupportedException { return super.clone(); } HistogramBin(double startBoundary, double endBoundary); }
HistogramBin implements Cloneable, Serializable { @Override public Object clone() throws CloneNotSupportedException { return super.clone(); } HistogramBin(double startBoundary, double endBoundary); int getCount(); void incrementCount(); double getStartBoundary(); double getEndBoundary(); double getBinWidth(); @Override boolean equals(Object obj); @Override Object clone(); }
HistogramBin implements Cloneable, Serializable { @Override public Object clone() throws CloneNotSupportedException { return super.clone(); } HistogramBin(double startBoundary, double endBoundary); int getCount(); void incrementCount(); double getStartBoundary(); double getEndBoundary(); double getBinWidth(); @Override boolean equals(Object obj); @Override Object clone();  }