@Test public void testCloning() throws CloneNotSupportedException { XYDataItem i1 = new XYDataItem(1.0, 1.1); XYDataItem i2 = (XYDataItem) i1.clone(); assertNotSame(i1, i2); assertSame(i1.getClass(), i2.getClass()); assertEquals(i1, i2); }
@Override public Object clone() throws CloneNotSupportedException { return super.clone(); }
XYDataItem implements Cloneable, Comparable<XYDataItem>, Serializable { @Override public Object clone() throws CloneNotSupportedException { return super.clone(); } }
XYDataItem implements Cloneable, Comparable<XYDataItem>, Serializable { @Override public Object clone() throws CloneNotSupportedException { return super.clone(); } XYDataItem(Number x, Number y);  XYDataItem(double x, double y); }
XYDataItem implements Cloneable, Comparable<XYDataItem>, Serializable { @Override public Object clone() throws CloneNotSupportedException { return super.clone(); } XYDataItem(Number x, Number y);  XYDataItem(double x, double y); Number getX(); double getXValue(); Number getY(); double getYValue(); void setY(double y); void setY(Number y); @Override int compareTo(XYDataItem dataItem); @Override Object clone(); XYDataItem copy(); @Override boolean equals(Object obj); @Override int hashCode(); @Override String toString(); }
XYDataItem implements Cloneable, Comparable<XYDataItem>, Serializable { @Override public Object clone() throws CloneNotSupportedException { return super.clone(); } XYDataItem(Number x, Number y);  XYDataItem(double x, double y); Number getX(); double getXValue(); Number getY(); double getYValue(); void setY(double y); void setY(Number y); @Override int compareTo(XYDataItem dataItem); @Override Object clone(); XYDataItem copy(); @Override boolean equals(Object obj); @Override int hashCode(); @Override String toString();  }