public Attribute addAttribute ( Group parent , String name , String value ) { if ( immutable ) throw new IllegalStateException ( "Cant modify" ) ; if ( value == null ) return null ; if ( parent == null ) parent = rootGroup ; Attribute att = new Attribute ( name , value ) ; parent . addAttribute ( att ) ; return att ; }
Add optional String attribute to a group .