@Test public void testClone() { final Key clone = (Key) key1.clone(); assertEquals(key1.amount, clone.amount); assertEquals(key1.properties, clone.properties); assertNotSame(key1, clone); }
@Override public Item clone() { return new Key((KeyProperties) properties, amount); }
Key extends AbstractItem { @Override public Item clone() { return new Key((KeyProperties) properties, amount); } }
Key extends AbstractItem { @Override public Item clone() { return new Key((KeyProperties) properties, amount); } Key(KeyProperties properties, int amount); }
Key extends AbstractItem { @Override public Item clone() { return new Key((KeyProperties) properties, amount); } Key(KeyProperties properties, int amount); @Override Item clone(); @Override void use(Character character); int getCode(); }
Key extends AbstractItem { @Override public Item clone() { return new Key((KeyProperties) properties, amount); } Key(KeyProperties properties, int amount); @Override Item clone(); @Override void use(Character character); int getCode();  }