@Test public void testClone() { final DexterityPotion clone = (DexterityPotion) potion1.clone(); assertEquals(potion1.amount, clone.amount); assertEquals(potion1.properties, clone.properties); assertNotSame(potion1, clone); final DexterityPotion clone2 = (DexterityPotion) potion2.clone(); assertEquals(potion2.amount, clone2.amount); assertEquals(potion2.properties, clone2.properties); assertNotSame(potion2, clone2); }
@Override public Item clone() { return new DexterityPotion((TemporalStatModifyingItemProperties) properties, amount); }
DexterityPotion extends ConsumableItem { @Override public Item clone() { return new DexterityPotion((TemporalStatModifyingItemProperties) properties, amount); } }
DexterityPotion extends ConsumableItem { @Override public Item clone() { return new DexterityPotion((TemporalStatModifyingItemProperties) properties, amount); } DexterityPotion(TemporalStatModifyingItemProperties properties, int amount); }
DexterityPotion extends ConsumableItem { @Override public Item clone() { return new DexterityPotion((TemporalStatModifyingItemProperties) properties, amount); } DexterityPotion(TemporalStatModifyingItemProperties properties, int amount); @Override Item clone(); @Override void use(Character character); int getMinModifier(); int getMaxModifier(); int getEffectDuration(); }
DexterityPotion extends ConsumableItem { @Override public Item clone() { return new DexterityPotion((TemporalStatModifyingItemProperties) properties, amount); } DexterityPotion(TemporalStatModifyingItemProperties properties, int amount); @Override Item clone(); @Override void use(Character character); int getMinModifier(); int getMaxModifier(); int getEffectDuration();  }