What situations does a Monostate pattern model?

Posted by devoured elysium on Stack Overflow See other posts from Stack Overflow or by devoured elysium
Published on 2010-04-05T03:39:30Z Indexed on 2010/04/05 3:43 UTC
Read the original article Hit count: 374

Filed under:
|
|

I know what both a Singleton or a Monostate are and how to implement them. Although I can see many uses for a Singleton, I can't imagine a situation where I would want to let the user create as many instances of my class although in reality only one really exists behind the scenes.

Can anybody help me here? I know that for several reasons one should stay away from both patterns, but in theory, what kind of problems does the Monostate model?

Thanks

© Stack Overflow or respective owner

Related posts about design-patterns

Related posts about java