public class ExactCoordinatePointEquality extends Object
PointEquality
implementation that considers two Point
s 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
Point s 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)
Point
s are equal.equals
in interface PointEquality
first
- first Point
second
- second Point
Point
.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 PointEquality
first
- the coordinates of the first Point
df1
- the DimensionalFlag
for the first coordinate arraysecond
- the coordinates second Point
to testdf2
- the DimensionalFlag
for the second coordinate arrayPoint
s represented by the coordinates are equalprotected double get(double[] coordinates, int index)
protected DimensionalFlag getDimensionalFlag()
Copyright © 2015 geolatte.org. All rights reserved.