fix must override a superclass method (#919)

* fix must override a superclass method

* fix must override a superclass method
This commit is contained in:
dongshengchen 2019-09-08 01:52:49 +08:00 committed by Ilkka Seppälä
parent 35dc25d480
commit c653edf38f
7 changed files with 12 additions and 0 deletions

View File

@ -29,14 +29,17 @@ package com.iluwatar.abstractfactory;
*/
public class ElfKingdomFactory implements KingdomFactory {
@Override
public Castle createCastle() {
return new ElfCastle();
}
@Override
public King createKing() {
return new ElfKing();
}
@Override
public Army createArmy() {
return new ElfArmy();
}

View File

@ -29,14 +29,17 @@ package com.iluwatar.abstractfactory;
*/
public class OrcKingdomFactory implements KingdomFactory {
@Override
public Castle createCastle() {
return new OrcCastle();
}
@Override
public King createKing() {
return new OrcKing();
}
@Override
public Army createArmy() {
return new OrcArmy();
}

View File

@ -33,10 +33,12 @@ public class ConfigureForDosVisitor implements AllModemVisitor {
private static final Logger LOGGER = LoggerFactory.getLogger(ConfigureForDosVisitor.class);
@Override
public void visit(Hayes hayes) {
LOGGER.info(hayes + " used with Dos configurator.");
}
@Override
public void visit(Zoom zoom) {
LOGGER.info(zoom + " used with Dos configurator.");
}

View File

@ -34,6 +34,7 @@ public class ConfigureForUnixVisitor implements ZoomVisitor {
private static final Logger LOGGER = LoggerFactory.getLogger(ConfigureForUnixVisitor.class);
@Override
public void visit(Zoom zoom) {
LOGGER.info(zoom + " used with Unix configurator.");
}

View File

@ -29,6 +29,7 @@ package com.iluwatar.factory.method;
*/
public class ElfBlacksmith implements Blacksmith {
@Override
public Weapon manufactureWeapon(WeaponType weaponType) {
return new ElfWeapon(weaponType);
}

View File

@ -29,6 +29,7 @@ package com.iluwatar.factory.method;
*/
public class OrcBlacksmith implements Blacksmith {
@Override
public Weapon manufactureWeapon(WeaponType weaponType) {
return new OrcWeapon(weaponType);
}

View File

@ -49,6 +49,7 @@ public class ThrottleTimerImpl implements Throttler {
* A timer is initiated with this method. The timer runs every second and resets the
* counter.
*/
@Override
public void start() {
new Timer(true).schedule(new TimerTask() {
@Override