You probably need the KShortestPaths class, which includes a nMaxHops
option
EDIT: I do have to note that I noticed considerably better performance with BellmanFordShortestPath if you're interested in the best path for each vertice, but you'll have to provide the vertices yourself and use something like GraphPathImpl to convert the set of edges into a GraphPath