Changeset View
Changeset View
Standalone View
Standalone View
java/src/main/java/org/softwareheritage/graph/Traversal.java
| Show First 20 Lines • Show All 57 Lines • ▼ Show 20 Lines | public class Traversal { | ||||
| * edges</a> | * edges</a> | ||||
| */ | */ | ||||
| public Traversal(Graph graph, String direction, String edgesFmt) { | public Traversal(Graph graph, String direction, String edgesFmt) { | ||||
| this(graph, direction, edgesFmt, 0); | this(graph, direction, edgesFmt, 0); | ||||
| } | } | ||||
| public Traversal(Graph graph, String direction, String edgesFmt, long maxEdges) { | public Traversal(Graph graph, String direction, String edgesFmt, long maxEdges) { | ||||
| this(graph, direction, edgesFmt, 0, "*"); | this(graph, direction, edgesFmt, maxEdges, "*"); | ||||
| } | } | ||||
| public Traversal(Graph graph, String direction, String edgesFmt, long maxEdges, String returnTypes) { | public Traversal(Graph graph, String direction, String edgesFmt, long maxEdges, String returnTypes) { | ||||
| if (!direction.matches("forward|backward")) { | if (!direction.matches("forward|backward")) { | ||||
| throw new IllegalArgumentException("Unknown traversal direction: " + direction); | throw new IllegalArgumentException("Unknown traversal direction: " + direction); | ||||
| } | } | ||||
| if (direction.equals("backward")) { | if (direction.equals("backward")) { | ||||
| ▲ Show 20 Lines • Show All 506 Lines • Show Last 20 Lines | |||||