Flyweight design patter on java in forest-tree example.
Author: Refactoring.Guru
Using: IntelJ IDEA Community Edition
Write an example Flyweight that saves RAM usage when creating many objects by creating and reusing flyweight objects with common properties.
It can be game objects: bullets, buildings, NPCs or others.
P.S. It's very similar to caching, but write the code as requested in this pattern.