com.almondtools.util.graph.AbstractTraversal Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of rexlex Show documentation
Show all versions of rexlex Show documentation
Regular expression matchers, searcher, lexers based on deterministic finite automata
package com.almondtools.util.graph;
public abstract class AbstractTraversal implements Traversal {
private Graph graph;
public AbstractTraversal(Graph graph) {
this.graph = graph;
}
public Graph getGraph() {
return graph;
}
@Override
public void traverse() {
graph.getRoot().apply(this);
}
@Override
public V getData(GraphNode node, Class clazz) {
return clazz.cast(node.getData(clazz));
}
@Override
public void setData(GraphNode node, V data) {
node.setData(data);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy