public abstract class AbstractGraphVisitorFI<T> extends java.lang.Object implements GraphVisitor<T>
| Modifier and Type | Field and Description |
|---|---|
private boolean |
aborted |
private BinaryProcedure<T,GraphVisitor<T>> |
callee |
private java.util.LinkedList<T> |
toVisit |
private java.util.Set<T> |
visited |
| Constructor and Description |
|---|
AbstractGraphVisitorFI(T first,
BinaryProcedure<T,GraphVisitor<T>> callee) |
| Modifier and Type | Method and Description |
|---|---|
void |
abort() |
private void |
add(T next) |
void |
enqueue(java.util.Collection<? extends T> next) |
void |
enqueue(T next) |
java.util.Collection<T> |
getVisitedNodes() |
void |
process() |
boolean |
wasAborted() |
private final java.util.LinkedList<T> toVisit
private final java.util.Set<T> visited
private final BinaryProcedure<T,GraphVisitor<T>> callee
private boolean aborted
AbstractGraphVisitorFI(T first, BinaryProcedure<T,GraphVisitor<T>> callee)
private void add(T next)
public void abort()
abort in interface GraphVisitor<T>public boolean wasAborted()
wasAborted in interface GraphVisitor<T>public java.util.Collection<T> getVisitedNodes()
getVisitedNodes in interface GraphVisitor<T>public void enqueue(T next)
enqueue in interface GraphVisitor<T>public void enqueue(java.util.Collection<? extends T> next)
enqueue in interface GraphVisitor<T>public void process()
process in interface GraphVisitor<T>