visualization/visualization-model/src/main/java/se/jguru/nazgul/tools/visualization/model/diagram/statement/Statements.java
public Edge findEdge(final String fromId, final String toId, final boolean recursive) {

        Optional<Edge> toReturn = getEdges().stream()
                .filter(c -> c.getId().equals(fromId) && c.getRightSideEdge().getId().equals(toId))
                .findFirst();

        if (!toReturn.isPresent() && recursive) {

            // Does the Node with the given identifier exist in any Subgraph?
            toReturn = subgraphs.stream().map(c -> c.getStatements().findEdge(fromId, toId, true)).findFirst();
        }

        // All Done.
        return toReturn.orElse(null);
    }
public Edge findEdge(final String fromId, final String toId, final boolean recursive) {

        Optional<Edge> toReturn = getEdges().stream()
                .filter(c -> c.getId().equals(fromId) && c.getRightSideEdge().getId().equals(toId))
                .findFirst();

        if (!toReturn.isPresent() && recursive) {

            // Does the Node with the given identifier exist in any Subgraph?
            toReturn = subgraphs.stream().map(c -> c.getStatements().findEdge(fromId, toId, true)).findFirst();
        }

        // All Done.
        return toReturn.orElse(null);
    }
Finds the Edge with the supplied identifier within this Statements (and within any contained Subgraphs, if the
{@code recursive} flag is true).

@param fromId    The Node or Subgraph identifier of the starting point of the Edge to find.
@param toId      The Node or Subgraph identifier of the finishing point of the Edge to find.
@param recursive If {@code true}, the search should recurse into the Statements of Subgraphs.
@return The Edge with the supplied identifier - or null if none was found.