JGraphT is a free Java graph library that provides mathematical graph-theory objects and algorithms. Although powerful, JGraphT is designed to be simple and type-safe (via Java 5 generics). For example, graph vertices can be of any objects. You can create graphs based on: Strings, URLs, XML documents, etc; you can even create graphs of graphs!