A method to check if there is a path from a given node to another node @param from the start node for checking @param to the end node for checking @return true if path exists, false otherwise
(Operator from, Operator to)
| 469 | * @return true if path exists, false otherwise |
| 470 | */ |
| 471 | public boolean pathExists(Operator from, Operator to) { |
| 472 | List<Operator> successors = getSuccessors( from ); |
| 473 | if(successors == null || successors.size() == 0) { |
| 474 | return false; |
| 475 | } |
| 476 | for (Operator successor : successors) { |
| 477 | if( successor.equals( to ) || pathExists( successor, to ) ) { |
| 478 | return true; |
| 479 | } |
| 480 | } |
| 481 | return false; |
| 482 | } |
| 483 | |
| 484 | /** |
| 485 | * Move everything below a given operator to the new operator plan. The specified operator will |
nothing calls this directly
no test coverage detected