public static IntArrayList getChildrenOf ( int [ ] parents , int parent ) { IntArrayList children = new IntArrayList ( ) ; for ( int i = 0 ; i < parents . length ; i ++ ) { if ( parents [ i ] == parent ) { children . add ( i ) ; } } return children ; }
Gets the children of the specified parent .