Ir al contenido principal

Entradas

Mostrando entradas de noviembre, 2012

El patron Singleton.

El patrón Singleton: Se asegura que una clase tenga una unica instancia, y provee un punto de acceso global a esta. El singleton basico : class Singleton     {           private static Singleton uniqueInstance;           private Singleton() { }           public static Singleton getInstance()         {             if (uniqueInstance == null )             {                 uniqueInstance = new Singleton ();               }               return uniqueInstance;...