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
--
peter royal -> [EMAIL PROTECTED]
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>