@ Override public int getIndexOfChild ( Object parentObj , Object childObj ) { if ( debugger == null ) { return - 1 ; } VariableNode parent = ( VariableNode ) parentObj ; VariableNode child = ( VariableNode ) childObj ; VariableNode [ ] children = children ( parent ) ; for ( int i = 0 ; i != children . length ; i ++ ) { if ( children [ i ] == child ) { return i ; } } return - 1 ; }
Returns the index of a node under its parent .