org.geotools.graph.structure.line
Class OptXYNode

java.lang.Object
  extended by org.geotools.graph.structure.opt.OptGraphable
      extended by org.geotools.graph.structure.opt.OptNode
          extended by org.geotools.graph.structure.line.OptXYNode
All Implemented Interfaces:
java.io.Serializable, Graphable, XYNode, Node

public class OptXYNode
extends OptNode
implements XYNode

Optimized implementation of XYNode extended from OptNode. 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:
OptNode, Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class org.geotools.graph.structure.opt.OptNode
OptNode.RelatedIterator
 
Constructor Summary
OptXYNode()
           
 
Method Summary
 com.vividsolutions.jts.geom.Coordinate getCoordinate()
          This method creates a new Coordinate object upon each call.
 void setCoordinate(com.vividsolutions.jts.geom.Coordinate c)
          This method strips only the x and y ordinates from the Coordinate object and stores them.
 
Methods inherited from class org.geotools.graph.structure.opt.OptNode
add, getDegree, getEdge, getEdgeArray, getEdges, getEdges, getRelated, remove, setDegree
 
Methods inherited from class org.geotools.graph.structure.opt.OptGraphable
getCount, getID, getObject, isVisited, setCount, setID, setObject, setVisited
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.geotools.graph.structure.Node
add, getDegree, getEdge, getEdges, getEdges, remove
 
Methods inherited from interface org.geotools.graph.structure.Graphable
getCount, getID, getObject, getRelated, isVisited, setCount, setID, setObject, setVisited
 

Constructor Detail

OptXYNode

public OptXYNode()
Method Detail

getCoordinate

public com.vividsolutions.jts.geom.Coordinate getCoordinate()
This method creates a new Coordinate object upon each call.

Specified by:
getCoordinate in interface XYNode
Returns:
A coordinate.
See Also:
XYNode.getCoordinate()

setCoordinate

public void setCoordinate(com.vividsolutions.jts.geom.Coordinate c)
This method strips only the x and y ordinates from the Coordinate object and stores them.

Specified by:
setCoordinate in interface XYNode
Parameters:
c - A coordinate.
See Also:
XYNode.setCoordinate(Coordinate)


Copyright © 1996-2010 Geotools. All Rights Reserved.