Package net.sourceforge.pmd.util
Class GraphUtil
- java.lang.Object
-
- net.sourceforge.pmd.util.GraphUtil
-
public final class GraphUtil extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
GraphUtil.DotColor
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <V> String
toDot(Collection<? extends V> vertices, Function<? super V,? extends Collection<? extends V>> successorFun, Function<? super V,GraphUtil.DotColor> colorFun, Function<? super V,String> labelFun)
Generate a DOT representation for a graph.
-
-
-
Method Detail
-
toDot
public static <V> String toDot(Collection<? extends V> vertices, Function<? super V,? extends Collection<? extends V>> successorFun, Function<? super V,GraphUtil.DotColor> colorFun, Function<? super V,String> labelFun)
Generate a DOT representation for a graph.- Type Parameters:
V
- Type of vertex, must be usable as map key (equals/hash)- Parameters:
vertices
- Set of verticessuccessorFun
- Function fetching successorscolorFun
- Color of vertex boxlabelFun
- Vertex label
-
-