org.opensha.commons.data
Interface Point2DComparator

All Superinterfaces:
Comparator<Point2D>
All Known Implementing Classes:
Point2DToleranceComparator

public interface Point2DComparator
extends Comparator<Point2D>

Title: DataPoint2DComparatorAPI

Description: This interface must be implemented by all comparators of DataPoint2D. The comparator uses a tolerance to specify when two values are within tolerance of each other, they are equal

Version:
1.0
Author:
Steven W. Rock
See Also:
DataPoint2D

Method Summary
 double getTolerance()
          Tolerance indicates the distance two values can be apart, but still considered equal.
 void setTolerance(double newTolerance)
          Tolerance indicates the distance two values can be apart, but still considered equal.
 
Methods inherited from interface java.util.Comparator
compare, equals
 

Method Detail

setTolerance

void setTolerance(double newTolerance)
                  throws InvalidRangeException
Tolerance indicates the distance two values can be apart, but still considered equal. This function sets the tolerance.

Parameters:
newTolerance - The new tolerance value
Throws:
InvalidRangeException - Is Thrown if the tolarance is negative

getTolerance

double getTolerance()
Tolerance indicates the distance two values can be apart, but still considered equal. This function returns the tolerance.

Returns:
The tolerance value