@Test public void testCloning() throws CloneNotSupportedException { ArrowNeedle n1 = new ArrowNeedle(false); ArrowNeedle n2 = (ArrowNeedle) n1.clone(); assertNotSame(n1, n2); assertSame(n1.getClass(), n2.getClass()); assertEquals(n1, n2); }
@Override public Object clone() throws CloneNotSupportedException { return super.clone(); }
ArrowNeedle extends MeterNeedle implements Cloneable, Serializable { @Override public Object clone() throws CloneNotSupportedException { return super.clone(); } }
ArrowNeedle extends MeterNeedle implements Cloneable, Serializable { @Override public Object clone() throws CloneNotSupportedException { return super.clone(); } ArrowNeedle(boolean isArrowAtTop); }
ArrowNeedle extends MeterNeedle implements Cloneable, Serializable { @Override public Object clone() throws CloneNotSupportedException { return super.clone(); } ArrowNeedle(boolean isArrowAtTop); @Override boolean equals(Object obj); @Override int hashCode(); @Override Object clone(); }
ArrowNeedle extends MeterNeedle implements Cloneable, Serializable { @Override public Object clone() throws CloneNotSupportedException { return super.clone(); } ArrowNeedle(boolean isArrowAtTop); @Override boolean equals(Object obj); @Override int hashCode(); @Override Object clone();  }