Open dkrawiec opened 8 years ago
Since Color class is immutable and there is going to be a lot of objects of this class in the jvm memory, we need to optimise memory usage.
Please provide a factory method which would follow flyweight design pattern. Please not that this method needs to be concurrency safe.
It is about core Color class.
Since Color class is immutable and there is going to be a lot of objects of this class in the jvm memory, we need to optimise memory usage.
Please provide a factory method which would follow flyweight design pattern. Please not that this method needs to be concurrency safe.