fix must override a superclass method (#919)
* fix must override a superclass method * fix must override a superclass method
This commit is contained in:
parent
35dc25d480
commit
c653edf38f
@ -29,14 +29,17 @@ package com.iluwatar.abstractfactory;
|
|||||||
*/
|
*/
|
||||||
public class ElfKingdomFactory implements KingdomFactory {
|
public class ElfKingdomFactory implements KingdomFactory {
|
||||||
|
|
||||||
|
@Override
|
||||||
public Castle createCastle() {
|
public Castle createCastle() {
|
||||||
return new ElfCastle();
|
return new ElfCastle();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public King createKing() {
|
public King createKing() {
|
||||||
return new ElfKing();
|
return new ElfKing();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public Army createArmy() {
|
public Army createArmy() {
|
||||||
return new ElfArmy();
|
return new ElfArmy();
|
||||||
}
|
}
|
||||||
|
@ -29,14 +29,17 @@ package com.iluwatar.abstractfactory;
|
|||||||
*/
|
*/
|
||||||
public class OrcKingdomFactory implements KingdomFactory {
|
public class OrcKingdomFactory implements KingdomFactory {
|
||||||
|
|
||||||
|
@Override
|
||||||
public Castle createCastle() {
|
public Castle createCastle() {
|
||||||
return new OrcCastle();
|
return new OrcCastle();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public King createKing() {
|
public King createKing() {
|
||||||
return new OrcKing();
|
return new OrcKing();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public Army createArmy() {
|
public Army createArmy() {
|
||||||
return new OrcArmy();
|
return new OrcArmy();
|
||||||
}
|
}
|
||||||
|
@ -33,10 +33,12 @@ public class ConfigureForDosVisitor implements AllModemVisitor {
|
|||||||
|
|
||||||
private static final Logger LOGGER = LoggerFactory.getLogger(ConfigureForDosVisitor.class);
|
private static final Logger LOGGER = LoggerFactory.getLogger(ConfigureForDosVisitor.class);
|
||||||
|
|
||||||
|
@Override
|
||||||
public void visit(Hayes hayes) {
|
public void visit(Hayes hayes) {
|
||||||
LOGGER.info(hayes + " used with Dos configurator.");
|
LOGGER.info(hayes + " used with Dos configurator.");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void visit(Zoom zoom) {
|
public void visit(Zoom zoom) {
|
||||||
LOGGER.info(zoom + " used with Dos configurator.");
|
LOGGER.info(zoom + " used with Dos configurator.");
|
||||||
}
|
}
|
||||||
|
@ -34,6 +34,7 @@ public class ConfigureForUnixVisitor implements ZoomVisitor {
|
|||||||
|
|
||||||
private static final Logger LOGGER = LoggerFactory.getLogger(ConfigureForUnixVisitor.class);
|
private static final Logger LOGGER = LoggerFactory.getLogger(ConfigureForUnixVisitor.class);
|
||||||
|
|
||||||
|
@Override
|
||||||
public void visit(Zoom zoom) {
|
public void visit(Zoom zoom) {
|
||||||
LOGGER.info(zoom + " used with Unix configurator.");
|
LOGGER.info(zoom + " used with Unix configurator.");
|
||||||
}
|
}
|
||||||
|
@ -29,6 +29,7 @@ package com.iluwatar.factory.method;
|
|||||||
*/
|
*/
|
||||||
public class ElfBlacksmith implements Blacksmith {
|
public class ElfBlacksmith implements Blacksmith {
|
||||||
|
|
||||||
|
@Override
|
||||||
public Weapon manufactureWeapon(WeaponType weaponType) {
|
public Weapon manufactureWeapon(WeaponType weaponType) {
|
||||||
return new ElfWeapon(weaponType);
|
return new ElfWeapon(weaponType);
|
||||||
}
|
}
|
||||||
|
@ -29,6 +29,7 @@ package com.iluwatar.factory.method;
|
|||||||
*/
|
*/
|
||||||
public class OrcBlacksmith implements Blacksmith {
|
public class OrcBlacksmith implements Blacksmith {
|
||||||
|
|
||||||
|
@Override
|
||||||
public Weapon manufactureWeapon(WeaponType weaponType) {
|
public Weapon manufactureWeapon(WeaponType weaponType) {
|
||||||
return new OrcWeapon(weaponType);
|
return new OrcWeapon(weaponType);
|
||||||
}
|
}
|
||||||
|
@ -49,6 +49,7 @@ public class ThrottleTimerImpl implements Throttler {
|
|||||||
* A timer is initiated with this method. The timer runs every second and resets the
|
* A timer is initiated with this method. The timer runs every second and resets the
|
||||||
* counter.
|
* counter.
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void start() {
|
public void start() {
|
||||||
new Timer(true).schedule(new TimerTask() {
|
new Timer(true).schedule(new TimerTask() {
|
||||||
@Override
|
@Override
|
||||||
|
Loading…
x
Reference in New Issue
Block a user