View Javadoc

1   /*
2    * SystemFactory.java
3    *
4    * Created on June 13, 2007, 4:19 PM
5    *
6    * To change this template, choose Tools | Template Manager
7    * and open the template in the editor.
8    */
9   
10  package tempcontroller.base;
11  
12  /**
13   *
14   * @author ipen
15   */
16  public class SystemFactory {
17      
18      /** Creates a new instance of SystemFactory */
19      private SystemFactory() {
20      }
21      
22      private static SystemFactory factory;
23      public static SystemFactory getFactory() {
24          if(factory == null) {
25              factory = new SystemFactory();
26          }
27          
28          return factory;
29      }
30      
31      public IAmostragem crateAmostragem() {
32          return new AmostragemSimples();
33      }
34      
35      public IProgramacaoAmostragem createProgramacao() {
36          return new ProgramacaoAmostragemSimples();
37      }
38      
39      public IControladorAmostragem createControladorAmostragem() {
40          return new ControladorAmostragem();
41      }
42  }