public void putAt ( final int index , final Object newValue ) { final GPathResult result = ( GPathResult ) getAt ( index ) ; if ( newValue instanceof Closure ) { result . replaceNode ( ( Closure ) newValue ) ; } else { result . replaceBody ( newValue ) ; } }
A helper method to allow GPathResults to work with subscript operators