mirror of
https://github.com/tiennm99/java-design-patterns.git
synced 2026-05-17 06:59:29 +00:00
23 lines
318 B
Java
23 lines
318 B
Java
package com.iluwatar;
|
|
|
|
/**
|
|
*
|
|
* Concrete factory.
|
|
*
|
|
*/
|
|
public class ElfKingdomFactory implements KingdomFactory {
|
|
|
|
public Castle createCastle() {
|
|
return new ElfCastle();
|
|
}
|
|
|
|
public King createKing() {
|
|
return new ElfKing();
|
|
}
|
|
|
|
public Army createArmy() {
|
|
return new ElfArmy();
|
|
}
|
|
|
|
}
|