mirror of
https://github.com/tiennm99/java-design-patterns.git
synced 2026-05-15 10:58:51 +00:00
Java 11 migration: ambassador async-method-invocation balking bridge builder (#1076)
* Moves ambassador pattern to java 11 * Moves async-method-invocation pattern to java 11 * Moves balking pattern to java 11 * Moves bridge pattern to java 11 * Moves builder pattern to java 11
This commit is contained in:
committed by
Ilkka Seppälä
parent
f0f0143d48
commit
c4418311c6
@@ -50,13 +50,13 @@ public class App {
|
||||
*/
|
||||
public static void main(String[] args) {
|
||||
LOGGER.info("The knight receives an enchanted sword.");
|
||||
Sword enchantedSword = new Sword(new SoulEatingEnchantment());
|
||||
var enchantedSword = new Sword(new SoulEatingEnchantment());
|
||||
enchantedSword.wield();
|
||||
enchantedSword.swing();
|
||||
enchantedSword.unwield();
|
||||
|
||||
LOGGER.info("The valkyrie receives an enchanted hammer.");
|
||||
Hammer hammer = new Hammer(new FlyingEnchantment());
|
||||
var hammer = new Hammer(new FlyingEnchantment());
|
||||
hammer.wield();
|
||||
hammer.swing();
|
||||
hammer.unwield();
|
||||
|
||||
Reference in New Issue
Block a user