Advertisement
Guest User

Untitled

a guest
May 28th, 2017
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.56 KB | None | 0 0
  1. package com.nethexa.colinversiones.speg;
  2.  
  3. import java.util.HashMap;
  4.  
  5. import com.nethexa.colinversiones.speg.web.SpegWindow;
  6.  
  7. public class SpegWindowRegistry {
  8.  
  9.     private SpegWindowRegistry instance;
  10.  
  11.     private HashMap<String, Class<SpegWindow>> windowRegistry = new HashMap<String, Class<SpegWindow>>();
  12.  
  13.     public SpegWindowRegistry getInstance() {
  14.         if (instance == null) {
  15.             instance = new SpegWindowRegistry();
  16.         }
  17.         return instance;
  18.     }
  19.  
  20.     public void registerWindow(Class<SpegWindow> window) {
  21.         windowRegistry.put(window.getName(), window);
  22.     }
  23.  
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement