public class ExactCoordinatePointEquality extends Object
PointEquality implementation that considers two Points to be equal if and only if
the have the same coordinates. Optionally, the coordinates considered in the test can be limited to specified
dimensions.| Constructor and Description |
|---|
ExactCoordinatePointEquality()
Creates an instance that takes all coordinate values into account.
|
ExactCoordinatePointEquality(DimensionalFlag dimensionalFlag)
Creates an instance that takes only the coordinates into account specified in the dimensionalFlag.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(double[] first,
DimensionalFlag df1,
double[] second,
DimensionalFlag df2)
Tests whether the specified coordinates represent the same point.
|
protected boolean |
equals(double co1,
double co2) |
boolean |
equals(Point first,
Point second)
Tests whether the specified
Points are equal. |
protected double |
get(double[] coordinates,
int index) |
protected DimensionalFlag |
getDimensionalFlag() |
public ExactCoordinatePointEquality(DimensionalFlag dimensionalFlag)
dimensionalFlag - specifies the dimensions that are considered in the equality testpublic ExactCoordinatePointEquality()
protected boolean equals(double co1,
double co2)
public boolean equals(Point first, Point second)
Points are equal.equals in interface PointEqualityfirst - first Pointsecond - second PointPoint.public boolean equals(double[] first,
DimensionalFlag df1,
double[] second,
DimensionalFlag df2)
The coordinates are assumed to be in the same Coordinate Reference System.
equals in interface PointEqualityfirst - the coordinates of the first Pointdf1 - the DimensionalFlag for the first coordinate arraysecond - the coordinates second Point to testdf2 - the DimensionalFlag for the second coordinate arrayPoints represented by the coordinates are equalprotected double get(double[] coordinates,
int index)
protected DimensionalFlag getDimensionalFlag()
Copyright © 2015 geolatte.org. All rights reserved.