class TopologyDag implements Serializable {

    public List<Edge> getAllEdges() {
        List<Edge> result = new ArrayList<>();
        for (List<Edge> edges : dag.values()) {
            result.addAll(edges);
        }
        return result;
    }

}