app/src/main/java/org/jgrapht/alg/BellmanFordShortestPath.java
public static <V, E> List<E> findPathBetween(
        Graph<V, E> graph,
        V startVertex,
        V endVertex)
    {
        BellmanFordShortestPath<V, E> alg =
            new BellmanFordShortestPath<V, E>(
                graph,
                startVertex);

        return alg.getPathEdgeList(endVertex);
    }
/**
     * Convenience method to find the shortest path via a single static method
     * call. If you need a more advanced search (e.g. limited by hops, or
     * computation of the path length), use the constructor instead.
     *
     * @param graph the graph to be searched
     * @param startVertex the vertex at which the path should start
     * @param endVertex the vertex at which the path should end
     *
     * @return List of Edges, or null if no path exists
     */
Convenience method to find the shortest path via a single static method
call. If you need a more advanced search , use the constructor instead.

@param graph the graph to be searched
@param startVertex the vertex at which the path should start
@param endVertex the vertex at which the path should end

@return List of Edges, or null if no path exists
Convenience method to find the shortest path via a single static method call . If you need a more advanced search use the constructor instead . @param graph the graph to be searched @param startVertex the vertex at which the path should start @param endVertex the vertex at which the path should end @return List of Edges or null if no path exists
public static <V, E> List<E> findPathBetween(
        Graph<V, E> graph,
        V startVertex,
        V endVertex)
    {
        BellmanFordShortestPath<V, E> alg =
            new BellmanFordShortestPath<V, E>(
                graph,
                startVertex);
        return alg.getPathEdgeList(endVertex);
    }
public static < V , E > List < E > findPathBetween ( Graph < V , E > graph , V startVertex , V endVertex ) { BellmanFordShortestPath < V , E > alg = new BellmanFordShortestPath < V , E > ( graph , startVertex ) ; return alg . getPathEdgeList ( endVertex ) ; }
Convenience method to find the shortest path via a single static method
 call.
Convenience method to find the shortest path via a single static method call .