code: public T add(T setting) {
  
          String key = key(setting);
  
          if (settings.containsKey(key)) {
              T instance = settings.get(key);
              if (instance.getClass() == setting.getClass()) {
                  return instance;
              }
          }
  
          // we could not add if we have a clash, but actual it might be useful
          // to 'override' a setting in sub classes with a new one
          settings.put(key(setting), setting);
  
          return setting;
  
      }
docs: Add a setting to the manager and return the instance to use. If a 'new' setting is added
  to the manager which matches the name and class of an previously added 'original' setting,
  the original setting will be returned. Otherwise the new setting is returned. This allows
  the add to be used in assignments as follows:
  
  <pre>{@code
  
  SettingManager   manager  = new SettingManager();
  BooleanIOSetting setting1 = manager.add(new BooleanIOSetting("use.3d", ...));
  BooleanIOSetting setting2 = manager.add(new BooleanIOSetting("use.3d", ...));
  
  // setting1 == setting2 and so changing a field in setting1 will also change the field
  // in setting2
  
  }</pre>
  
  If the names are not equal or the names are equal but the classes are not the new setting
  is added and returned.
  
  @param setting the setting to add
  @return usable setting