I'd suggest creating a class that has a package scoped variable that you can feed and retrieve single objects. Feed it way of instantiating your object if it isn't created.
Singleton objects are always a very touchy, delicate things. Containment, testing and what not are difficult.
In reply to Re^2: Making an Existing Class a Singleton
by exussum0
in thread Making an Existing Class a Singleton
by agianni
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |