private boolean checkTransitive ( String groupStart , String groupIn , String groupEnd , Collection < GroupTransition > localChecked , Deque < GroupTransition > found , boolean first ) { boolean ok = false ; for ( final String groupOut : mapGroup . getGroups ( ) ) { final GroupTransition transitive = new GroupTransition ( groupIn , groupOut ) ; final boolean firstOrNext = first && groupIn . equals ( groupStart ) || ! first && ! groupIn . equals ( groupOut ) ; if ( firstOrNext && ! localChecked . contains ( transitive ) ) { localChecked . add ( transitive ) ; final boolean nextFirst = countTransitions ( groupStart , transitive , groupEnd , found , first ) ; if ( groupOut . equals ( groupEnd ) ) { ok = true ; } else { checkTransitive ( groupStart , groupOut , groupEnd , localChecked , found , nextFirst ) ; } } } return ok ; }
Check transitive groups .