public ParseTreeNode getChild ( String name ) throws TreeException { ParseTreeNode result = null ; for ( ParseTreeNode child : children ) { if ( child . getName ( ) . equals ( name ) ) { if ( result != null ) { throw new TreeException ( "Child '" + name + "'is multiply defined!" ) ; } result = child ; } } return result ; }
This method returns the child with the given name from this node .