Consider a class called Effects
that has a static ArrayList
called effects
.
The class contains a few static functions that are called across all the program, for example the static function: Effects.addEffect(effect)
which adds an effect to the ArrayList effects
According to this, the class Effects
has the following points:
- Doesn't make sense to have more than one instance of this class.
- The class functions are called globally across all the program, therefore if the class won't be static an instance should be passed across all the program!
According to good programming practices, should I make this class singleton, static or just a regular class with which I should pass an instance across all the program?