Exemple #1
0
 public static StudentIdGenerator getGenerator()
 {
     if (instance == null)                    //provjera postoji li instanca generatora
     {
         instance = new StudentIdGenerator(); //ako nema, kreira ju
     }
     return(instance);
 }
 public static StudentIdGenerator GetInstance()
 {
     if (newInstance == null)
     {
         newInstance = new StudentIdGenerator();
     }
     return(newInstance);
 }
 public static StudentIdGenerator getInstance()
 {
     if (idGenerator == null)
     {
         idGenerator = new StudentIdGenerator();
         return(idGenerator);
     }
     return(idGenerator);
 }
        public static StudentIdGenerator getInstance()
        {
            if (_instance == null)
            {
                _instance = new StudentIdGenerator();
            }

            return(_instance);
        }
Exemple #5
0
 private StudentContainer()
 {
     studentIdGenerator = StudentIdGenerator.getGenerator(); //instanciranje generatora
 }