mirror of
https://github.com/tiennm99/java-design-patterns.git
synced 2026-05-19 21:25:38 +00:00
17 lines
367 B
Java
17 lines
367 B
Java
package com.iluwatar;
|
|
|
|
/**
|
|
*
|
|
* Flyweight (PotionFactory) is useful when there is plethora of objects
|
|
* (Potion). It provides means to decrease resource usage by sharing object
|
|
* instances.
|
|
*
|
|
*/
|
|
public class App {
|
|
|
|
public static void main(String[] args) {
|
|
AlchemistShop alchemistShop = new AlchemistShop();
|
|
alchemistShop.enumerate();
|
|
}
|
|
}
|