kmisztal / KiMage

Java Image Processing Library
6 stars 12 forks source link

[URGENT] Flyweight design pattern for Color class #40

Open dkrawiec opened 8 years ago

dkrawiec commented 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.

dkrawiec commented 8 years ago

It is about core Color class.