org.geotools.graph.structure
Interface Graphable
- All Known Subinterfaces:
- DirectedEdge, DirectedGraphable, DirectedNode, Edge, Node, XYNode
- All Known Implementing Classes:
- BasicDirectedEdge, BasicDirectedNode, BasicDirectedXYNode, BasicEdge, BasicGraphable, BasicNode, BasicXYNode, OptDirectedEdge, OptDirectedNode, OptDirectedXYNode, OptEdge, OptGraphable, OptNode, OptXYNode
- public interface Graphable
Represents a component of a graph. Graph components
model "real life" entities. These entities are represented by an
underyling object reference.
- Author:
- Justin Deoliveira, Refractions Research Inc, jdeolive@refractions.net
- See Also:
Graph
Method Summary |
int |
getCount()
Returns the value of the counter for the component. |
int |
getID()
Returns an identifier for the component. |
java.lang.Object |
getObject()
Returns the underlying object referenced by the graph component. |
java.util.Iterator |
getRelated()
Returns an iterator over any related components. |
boolean |
isVisited()
Determines if the component has been marked as visited. |
void |
setCount(int count)
Sets the value of the counter for the component. |
void |
setID(int id)
Sets the identifying integer for the component. |
void |
setObject(java.lang.Object obj)
Sets the underlying object reference for the component. |
void |
setVisited(boolean visited)
Marks the component as being visited/unvisited. |
getID
public int getID()
- Returns an identifier for the component. This number is not
necessarily persistent or unique.
- Returns:
- Identifying integer.
setID
public void setID(int id)
- Sets the identifying integer for the component.
- Parameters:
id
- New identifying integer.
isVisited
public boolean isVisited()
- Determines if the component has been marked as visited. The visited
flag serves as a binary switch for the component which can be used
for graph queries, graph traversals, or user defined purposes.
- Returns:
- True if visited(on), false if unvisited(off).
setVisited
public void setVisited(boolean visited)
- Marks the component as being visited/unvisited. The visited
flag serves as a binary switch for the component which can be used
for graph queries, graph traversals, or user defined purposes.
- Parameters:
visited
- True if visited(on), false if unvisited(off).
getCount
public int getCount()
- Returns the value of the counter for the component. Graph components
have a counter associated with them to be used for graph queries, graph
traversals, or user defined purposes.
- Returns:
- int The value of the counter for the component.
setCount
public void setCount(int count)
- Sets the value of the counter for the component. Graph components
have a counter associated with them to be used for graph queries, graph
traversals, or user defined purposes.
- Parameters:
count
- The new value of the counter for the component.
getObject
public java.lang.Object getObject()
- Returns the underlying object referenced by the graph component.
- Returns:
- Underlying object reference, the entity being modelled by
graph component.
setObject
public void setObject(java.lang.Object obj)
- Sets the underlying object reference for the component.
- Parameters:
obj
- The entity being modelled by the graph component.
getRelated
public java.util.Iterator getRelated()
- Returns an iterator over any related components. A graph component is
related to other components of the graph of similary type through some
relationship.
- Returns:
- Iterator An iterator over other components of the graph that
are related to the component.
Copyright © GeoTools. All Rights Reserved.