public static class DirectedAcyclicGraph.VisitedHashSetImpl extends Object implements DirectedAcyclicGraph.Visited, DirectedAcyclicGraph.VisitedFactory
Constructor and Description |
---|
VisitedHashSetImpl() |
Modifier and Type | Method and Description |
---|---|
void |
clearVisited(int index)
Clear the visited state of the given topological index
|
DirectedAcyclicGraph.Visited |
getInstance(DirectedAcyclicGraph.Region affectedRegion)
Create a new instance of
DirectedAcyclicGraph.Visited . |
boolean |
getVisited(int index)
Has the given topological index been visited?
|
void |
setVisited(int index)
Mark the given topological index as visited
|
public DirectedAcyclicGraph.Visited getInstance(DirectedAcyclicGraph.Region affectedRegion)
DirectedAcyclicGraph.VisitedFactory
DirectedAcyclicGraph.Visited
.getInstance
in interface DirectedAcyclicGraph.VisitedFactory
affectedRegion
- the affected regionDirectedAcyclicGraph.Visited
for the affected regionpublic void setVisited(int index)
DirectedAcyclicGraph.Visited
setVisited
in interface DirectedAcyclicGraph.Visited
index
- the topological indexpublic boolean getVisited(int index)
DirectedAcyclicGraph.Visited
getVisited
in interface DirectedAcyclicGraph.Visited
index
- the topological indexpublic void clearVisited(int index) throws UnsupportedOperationException
DirectedAcyclicGraph.Visited
clearVisited
in interface DirectedAcyclicGraph.Visited
index
- the indexUnsupportedOperationException
- if the implementation doesn't support (or doesn't
need) clearance. For example, if the factory vends a new instance every time, it
is a waste of cycles to clear the state after the search of the Affected Region
is done, so an UnsupportedOperationException *should* be thrown.Copyright © 2016. All rights reserved.