|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.vividsolutions.jts.planargraph.GraphComponent
public abstract class GraphComponent
The base class for all graph component classes. Maintains flags of use in generic graph algorithms. Provides two flags:
Graph components support storing user context data. This will typically be used by client algorithms which use planar graphs.
Field Summary | |
---|---|
protected boolean |
isMarked
|
protected boolean |
isVisited
|
Constructor Summary | |
---|---|
GraphComponent()
|
Method Summary | |
---|---|
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 GraphComponent s 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 GraphComponent s in an Iterator |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected boolean isMarked
protected boolean isVisited
Constructor Detail |
---|
public GraphComponent()
Method Detail |
---|
public static void setVisited(java.util.Iterator i, boolean visited)
GraphComponent
s in an Iterator
i
- the Iterator to scanvisited
- the state to set the visited flag topublic static void setMarked(java.util.Iterator i, boolean marked)
GraphComponent
s in an Iterator
i
- 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 test
null
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 removed
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |