public SettingsItem(String key,SettingsItem parent,Type type){
  if (key == null || key.isEmpty()) {
    throw new IllegalArgumentException("Settings item has no Key." + (parent == null ? "" : " Parent: " + parent.toString()));
  }
  if (type == null) {
    throw new IllegalArgumentException("Settings item has no type." + (parent == null ? "" : " Parent: " + parent.toString()));
  }
  this.key=key;
  this.parent=parent;
  this.type=type;
  if (parent != null) {
    parent.addChild(this);
  }
}

public SettingsItem ( String key , SettingsItem parent , Type type ) { if ( key == null || key . isEmpty ( ) ) { throw new IllegalArgumentException ( "Settings item has no Key." + ( parent == null ? "" : " Parent: " + parent . toString ( ) ) ) ; } if ( type == null ) { throw new IllegalArgumentException ( "Settings item has no type." + ( parent == null ? "" : " Parent: " + parent . toString ( ) ) ) ; } this . key = key ; this . parent = parent ; this . type = type ; if ( parent != null ) { parent . addChild ( this ) ; } }
sets object variables and updates parent / child relations .
