mirror of
https://github.com/tiennm99/java-design-patterns.git
synced 2026-05-16 10:59:03 +00:00
Formatted all files to the same standard
This commit is contained in:
@@ -5,16 +5,16 @@ import java.util.EnumMap;
|
||||
/**
|
||||
*
|
||||
* Flyweight.
|
||||
*
|
||||
*
|
||||
*/
|
||||
public class PotionFactory {
|
||||
|
||||
private EnumMap<PotionType, Potion> potions;
|
||||
|
||||
|
||||
public PotionFactory() {
|
||||
potions = new EnumMap<>(PotionType.class);
|
||||
}
|
||||
|
||||
|
||||
Potion createPotion(PotionType type) {
|
||||
Potion potion = potions.get(type);
|
||||
if (potion == null) {
|
||||
@@ -45,5 +45,5 @@ public class PotionFactory {
|
||||
}
|
||||
return potion;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user