getInstance method

IFacade getInstance(
  1. String key
)

IFacade Multiton Factory method

  • Returns the IFacade Multiton instance for the specified key.

Implementation

static IFacade getInstance(String key) {
  if (key == null || key == "") return null;
  if (instanceMap == null) instanceMap = new Map<String, IFacade>();
  if (instanceMap[key] == null) instanceMap[key] = new Facade(key);
  return instanceMap[key];
}