public <T extends SubSystem>void addSystem(Class<T> systemApi,T system){
  SubSystem oldSystem=_systemMap.putIfAbsent(systemApi,system);
  if (oldSystem != null) {
    throw new IllegalStateException(L.l("duplicate system '{0}' is not allowed because another system with that class is already registered '{1}'",system,oldSystem));
  }
  _pendingStart.add(system);
  if (_lifecycle.isActive()) {
    startSystems();
  }
}

public < T extends SubSystem > void addSystem ( Class < T > systemApi , T system ) { SubSystem oldSystem = _systemMap . putIfAbsent ( systemApi , system ) ; if ( oldSystem != null ) { throw new IllegalStateException ( L . l ( "duplicate system '{0}' is not allowed because another system with that class is already registered '{1}'" , system , oldSystem ) ) ; } _pendingStart . add ( system ) ; if ( _lifecycle . isActive ( ) ) { startSystems ( ) ; } }
adds a new system .
