Java 11 migrate 7 remaining f (#1115)
* Moves facade to Java 11 * Moves factory-kit to Java 11 * Moves factory-method to Java 11 * Moves feature-toggle to Java 11 * Moves fluentinterface to Java 11 * Moves flux to Java 11 * Moves flyweight to Java 11 * Moves front-controller to Java 11 * Uses stream properly * Resolves issues with ci
This commit is contained in:
committed by
Ilkka Seppälä
parent
f835d3d516
commit
670c4e43f3
@ -72,7 +72,7 @@ public class PotionFactory {
|
||||
}
|
||||
|
||||
Potion createPotion(PotionType type) {
|
||||
Potion potion = potions.get(type);
|
||||
var potion = potions.get(type);
|
||||
if (potion == null) {
|
||||
switch (type) {
|
||||
case HEALING:
|
||||
@ -99,7 +99,7 @@ public class PotionFactory {
|
||||
And it can be used as below
|
||||
|
||||
```java
|
||||
PotionFactory factory = new PotionFactory();
|
||||
var factory = new PotionFactory();
|
||||
factory.createPotion(PotionType.INVISIBILITY).drink(); // You become invisible. (Potion=6566818)
|
||||
factory.createPotion(PotionType.HEALING).drink(); // You feel healed. (Potion=648129364)
|
||||
factory.createPotion(PotionType.INVISIBILITY).drink(); // You become invisible. (Potion=6566818)
|
||||
|
Reference in New Issue
Block a user