> From: Peter Royal [mailto:[EMAIL PROTECTED]] > > On Friday 07 June 2002 03:13 pm, Berin Loritsch wrote: > > Configuration family = processFamily(...); > > Configuration strip = processStrip(...); > > > > family.addChild(strip); family.addChild(strip.branch("peg-strip")); > > family.addChild(strip.branch("vert-peg-strip")); > > > > This frees me from being forced to do a lot of otherwise > complex logic > > at this level. > > > > Do others think that this would be useful? > > I am unsure of how your example is different from: > > family.alldChild( strip.getChild( "peg-strip" ) ); > > Or is branch the equiv. of: > > Configuration branch( String newRoot ) > { > DefaultConfiguration c = new DefaultConfiguration( newRoot ); > Configuration[] kids = this.getChildren(); > > for( int i = 0; i < kids.length; i++ ) > { > c.addChild( kids[i] ); > } > > return c; > } > > If its the latter, I think it might be better in a separate > class as a static > utility method. > -pete
It is more the latter--don't forget to copy the attributes... All I am doing is changing the root name. -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
