All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.almondtools.util.graph.AbstractTraversal Maven / Gradle / Ivy

Go to download

Regular expression matchers, searcher, lexers based on deterministic finite automata

There is a newer version: 0.3.3
Show newest version
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