DirectedEdge, Edge, Nodepublic abstract class GraphComponent
extends java.lang.Object
Graph components support storing user context data. This will typically be used by client algorithms which use planar graphs.
| Constructor | Description |
|---|---|
GraphComponent() |
| Modifier and Type | Method | Description |
|---|---|---|
static GraphComponent |
getComponentWithVisitedState(java.util.Iterator i,
boolean visitedState) |
Finds the first
GraphComponent in a Iterator set
which has the specified visited state. |
java.lang.Object |
getContext() |
Gets the user-defined data for this component.
|
java.lang.Object |
getData() |
Gets the user-defined data for this component.
|
boolean |
isMarked() |
Tests if a component has been marked at some point during the processing
involving this graph.
|
abstract boolean |
isRemoved() |
Tests whether this component has been removed from its containing graph
|
boolean |
isVisited() |
Tests if a component has been visited during the course of a graph algorithm
|
void |
setContext(java.lang.Object data) |
Sets the user-defined data for this component.
|
void |
setData(java.lang.Object data) |
Sets the user-defined data for this component.
|
void |
setMarked(boolean isMarked) |
Sets the marked flag for this component.
|
static void |
setMarked(java.util.Iterator i,
boolean marked) |
Sets the Marked state for all
GraphComponents in an Iterator |
void |
setVisited(boolean isVisited) |
Sets the visited flag for this component.
|
static void |
setVisited(java.util.Iterator i,
boolean visited) |
Sets the Visited state for all
GraphComponents in an Iterator |
public static void setVisited(java.util.Iterator i,
boolean visited)
GraphComponents in an Iteratori - the Iterator to scanvisited - the state to set the visited flag topublic static void setMarked(java.util.Iterator i,
boolean marked)
GraphComponents in an Iteratori - the Iterator to scanmarked - the state to set the Marked flag topublic static GraphComponent getComponentWithVisitedState(java.util.Iterator i, boolean visitedState)
GraphComponent in a Iterator set
which has the specified visited state.i - an Iterator of GraphComponentsvisitedState - the visited state to testnull if none foundpublic boolean isVisited()
true if the component has been visitedpublic void setVisited(boolean isVisited)
isVisited - the desired value of the visited flagpublic boolean isMarked()
true if the component has been markedpublic void setMarked(boolean isMarked)
isMarked - the desired value of the marked flagpublic void setContext(java.lang.Object data)
data - an Object containing user-defined datapublic java.lang.Object getContext()
public void setData(java.lang.Object data)
data - an Object containing user-defined datapublic java.lang.Object getData()
public abstract boolean isRemoved()
true if this component is removedCopyright © 2018. All rights reserved.