Package org.graphwalker.core.generator
Class CombinedPath
java.lang.Object
org.graphwalker.core.generator.PathGeneratorBase<StopCondition>
org.graphwalker.core.generator.CombinedPath
- All Implemented Interfaces:
PathGenerator<StopCondition>
CombinedPath
The CombinedPath generator holds a list of generators that will execute in order. CombinedPath is used for concatenating path generators. When executing, aExecutionContext will exhaust the generators in
the list one by one.
Below is an example of how to use the CombinedPath generator.
CombinedPath generator = new CombinedPath();
generator.addPathGenerator(new RandomPath(new ReachedVertex("v1")));
generator.addPathGenerator(new RandomPath(new ReachedVertex("v2")));
Context context = new TestExecutionContext(model, generator);
- Author:
- Nils Olsson
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddPathGenerator(PathGenerator generator) booleanvoidsetContext(Context context) toString(StringBuilder builder) Methods inherited from class org.graphwalker.core.generator.PathGeneratorBase
getContext, setStopCondition, toString
-
Constructor Details
-
CombinedPath
public CombinedPath()
-
-
Method Details
-
addPathGenerator
-
setContext
- Specified by:
setContextin interfacePathGenerator<StopCondition>- Overrides:
setContextin classPathGeneratorBase<StopCondition>
-
getPathGenerators
-
getStopCondition
- Specified by:
getStopConditionin interfacePathGenerator<StopCondition>- Overrides:
getStopConditionin classPathGeneratorBase<StopCondition>
-
getNextStep
- Specified by:
getNextStepin interfacePathGenerator<StopCondition>- Overrides:
getNextStepin classPathGeneratorBase<StopCondition>
-
hasNextStep
public boolean hasNextStep() -
toString
- Specified by:
toStringin interfacePathGenerator<StopCondition>- Overrides:
toStringin classPathGeneratorBase<StopCondition>
-