@Test public void testClone() { final GrabableProp clone = (GrabableProp) prop1.clone(); assertEquals(prop1.amount, clone.amount); assertEquals(prop1.properties, clone.properties); assertNotSame(prop1, clone); final GrabableProp clone2 = (GrabableProp) prop2.clone(); assertEquals(prop2.amount, clone2.amount); assertEquals(prop2.properties, clone2.properties); assertNotSame(prop2, clone2); }
@Override public Item clone() { return new GrabableProp((ItemProperties) properties, amount); }
GrabableProp extends AbstractItem { @Override public Item clone() { return new GrabableProp((ItemProperties) properties, amount); } }
GrabableProp extends AbstractItem { @Override public Item clone() { return new GrabableProp((ItemProperties) properties, amount); } GrabableProp(ItemProperties properties, int amount); }
GrabableProp extends AbstractItem { @Override public Item clone() { return new GrabableProp((ItemProperties) properties, amount); } GrabableProp(ItemProperties properties, int amount); @Override Item clone(); @Override void use(Character character); }
GrabableProp extends AbstractItem { @Override public Item clone() { return new GrabableProp((ItemProperties) properties, amount); } GrabableProp(ItemProperties properties, int amount); @Override Item clone(); @Override void use(Character character);  }