protected AbstractPreferences(AbstractPreferences parent,String name){
  if (parent == null) {
    if (!name.equals(""))     throw new IllegalArgumentException("Root name '" + name + "' must be \"\"");
    this.absolutePath="/";
    root=this;
  }
 else {
    if (name.indexOf('/') != -1)     throw new IllegalArgumentException("Name '" + name + "' contains '/'");
    if (name.equals(""))     throw new IllegalArgumentException("Illegal name: empty string");
    root=parent.root;
    absolutePath=(parent == root ? "/" + name : parent.absolutePath() + "/" + name);
  }
  this.name=name;
  this.parent=parent;
}

protected AbstractPreferences ( AbstractPreferences parent , String name ) { if ( parent == null ) { if ( ! name . equals ( "" ) ) throw new IllegalArgumentException ( "Root name '" + name + "' must be \"\"" ) ; this . absolutePath = "/" ; root = this ; } else { if ( name . indexOf ( '/' ) != - 1 ) throw new IllegalArgumentException ( "Name '" + name + "' contains '/'" ) ; if ( name . equals ( "" ) ) throw new IllegalArgumentException ( "Illegal name: empty string" ) ; root = parent . root ; absolutePath = ( parent == root ? "/" + name : parent . absolutePath ( ) + "/" + name ) ; } this . name = name ; this . parent = parent ; }
creates a preference node with the specified parent and the specified name relative to its parent .
