T
- the final type of the geometry implementing this interface.public interface GeometricallyComparable<T>
GeometricallyComparable
, geometries can implement a custom comparison
with the aim of evaluating the similarity between two geometries of the same type.
It is important to note the difference between this interface and EpsilonComparable
,
implementations of which provide a component-based comparison mostly useful to assert that for
instance components properly send over a network.
Modifier and Type | Method and Description |
---|---|
boolean |
geometricallyEquals(T other,
double epsilon)
Tests if
this and other represent the same geometry to an epsilon . |
boolean geometricallyEquals(T other, double epsilon)
this
and other
represent the same geometry to an epsilon
.
The implementation of this test depends on the type of geometry. For instance, two points will
be considered geometrically equal if they are at a distance from each other that is less or
equal than epsilon
.
other
- the other geometry object to compare against this. Not modified.epsilon
- tolerance to use when comparing the two objects, usually refers to a distance.true
if the two objects represent the same geometry, false
otherwise.