org.geotools.graph.build
Class PolygonComparator

java.lang.Object
  extended byorg.geotools.graph.build.FeatureComparator
      extended byorg.geotools.graph.build.PolygonComparator
All Implemented Interfaces:
java.util.Comparator

public class PolygonComparator
extends FeatureComparator

An implentation of FeatureComparator used to compare Polygons.


Field Summary
 
Fields inherited from class org.geotools.graph.build.FeatureComparator
NO_RELATIONSHIP
 
Constructor Summary
PolygonComparator()
           
 
Method Summary
 int compare(org.geotools.feature.Feature f1, org.geotools.feature.Feature f2)
          Implements the touches relationship
 
Methods inherited from class org.geotools.graph.build.FeatureComparator
compare
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.Comparator
equals
 

Constructor Detail

PolygonComparator

public PolygonComparator()
Method Detail

compare

public int compare(org.geotools.feature.Feature f1,
                   org.geotools.feature.Feature f2)
Implements the touches relationship

Touches is a bidirecitonal relationship - so the order in which the features are added into the graph should not effect the resulting outcome.

Specified by:
compare in class FeatureComparator
Parameters:
f1 - DOCUMENT ME!
f2 - DOCUMENT ME!
Returns:
DOCUMENT ME!