Winston Gutkowski wrote:But you don't have a static class, you have an enum, so if it needs a member variable, you have no choice...
Actually, thinking about it, an enum is a bit like a static class (by which I assume you mean a class with a single
private no-args constructor), so declaring a member variable would be a bit like declaring a static variable.
Enums are generally about defining
constants, not variables. If they have state, you're back to the basic issue about singletons: Global state is usually not a good thing. At the very least you will almost certainly need to make the class Thread-safe, since anyone can use it.
Winston