Connect two operators in the plan, controlling which position in the edge lists that the from and to edges are placed. @param from Operator edge will come from @param fromPos Position in the array for the from edge @param to Operator edge will go to @param toPos Position in the array for the to edge
(Operator from,
int fromPos,
Operator to,
int toPos)
| 189 | * @param toPos Position in the array for the to edge |
| 190 | */ |
| 191 | public void connect(Operator from, |
| 192 | int fromPos, |
| 193 | Operator to, |
| 194 | int toPos) { |
| 195 | if( isConnected( from, to ) || from == null || to == null) { |
| 196 | return; |
| 197 | } |
| 198 | markDirty(); |
| 199 | fromEdges.put(from, to, fromPos); |
| 200 | toEdges.put(to, from, toPos); |
| 201 | } |
| 202 | |
| 203 | /** |
| 204 | * Check if given two operators are directly connected. |
no test coverage detected