Class OptDirectedXYNode
- Object
-
- OptGraphable
-
- OptDirectedNode
-
- OptDirectedXYNode
-
- All Implemented Interfaces:
Serializable
,DirectedGraphable
,DirectedNode
,Graphable
,XYNode
,Node
public class OptDirectedXYNode extends OptDirectedNode implements XYNode
Optimized implementation of XYNode extended from OptDirectedNode. Instead of storing an underlying coordinate object, only a set of (x,y) values are stored eliminating the storage of additional oordinate dimensions.- Author:
- Justin Deoliveira, Refractions Research Inc, jdeolive@refractions.net
- See Also:
OptDirectedNode
, Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class OptDirectedNode
OptDirectedNode.RelatedIterator
-
-
Constructor Summary
Constructors Constructor Description OptDirectedXYNode()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Coordinate
getCoordinate()
This method creates a new Coordinate object upon each call.void
setCoordinate(Coordinate c)
This method strips only the x and y ordinates from the Coordinate object and stores them.-
Methods inherited from class OptDirectedNode
add, addIn, addOut, getDegree, getEdge, getEdges, getEdges, getInDegree, getInEdge, getInEdgeArray, getInEdges, getInEdges, getInRelated, getOutDegree, getOutEdge, getOutEdgeArray, getOutEdges, getOutEdges, getOutRelated, getRelated, remove, removeIn, removeOut, setInDegree, setOutDegree
-
Methods inherited from class OptGraphable
getCount, getID, getObject, isVisited, setCount, setID, setObject, setVisited
-
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface Graphable
getCount, getID, getObject, getRelated, isVisited, setCount, setID, setObject, setVisited
-
-
-
-
Method Detail
-
getCoordinate
public Coordinate getCoordinate()
This method creates a new Coordinate object upon each call.- Specified by:
getCoordinate
in interfaceXYNode
- Returns:
- A coordinate.
- See Also:
XYNode.getCoordinate()
-
setCoordinate
public void setCoordinate(Coordinate c)
This method strips only the x and y ordinates from the Coordinate object and stores them.- Specified by:
setCoordinate
in interfaceXYNode
- Parameters:
c
- A coordinate.- See Also:
XYNode.setCoordinate(Coordinate)
-
-