@Test public void testEquals() { final NicGeoPoint pointA = new NicGeoPointImpl(); pointA.setXY(100, 200); assertTrue(pointA.equals(pointA)); assertFalse(pointA.equals(null)); assertFalse(pointA.equals("hallo!?")); final NicGeoPoint pointB = new NicGeoPointImpl(); pointB.setXY(100, 200); assertTrue(pointA.equals(pointB)); assertTrue(pointB.equals(pointA)); pointB.setXY(101, 200); assertFalse(pointA.equals(pointB)); assertFalse(pointB.equals(pointA)); pointB.setXY(100, 201); assertFalse(pointA.equals(pointB)); assertFalse(pointB.equals(pointA)); pointB.setXY(100, 200); pointB.setDivergence(1); assertFalse(pointA.equals(pointB)); assertFalse(pointB.equals(pointA)); pointA.setDivergence(1); assertTrue(pointA.equals(pointB)); assertTrue(pointB.equals(pointA)); }
@Override public boolean equals(final Object o) { if (o == null) { return false; } if (o == this) { return true; } if (!(o instanceof NicGeoPoint)) { return false; } final NicGeoPoint nicGeoPoint = (NicGeoPoint) o; return (((getY() == nicGeoPoint.getY()) && (getX() == nicGeoPoint.getX()) && (divergence == nicGeoPoint.getDivergence()))); }
NicGeoPointImpl extends GeoPoint implements NicGeoPoint { @Override public boolean equals(final Object o) { if (o == null) { return false; } if (o == this) { return true; } if (!(o instanceof NicGeoPoint)) { return false; } final NicGeoPoint nicGeoPoint = (NicGeoPoint) o; return (((getY() == nicGeoPoint.getY()) && (getX() == nicGeoPoint.getX()) && (divergence == nicGeoPoint.getDivergence()))); } }
NicGeoPointImpl extends GeoPoint implements NicGeoPoint { @Override public boolean equals(final Object o) { if (o == null) { return false; } if (o == this) { return true; } if (!(o instanceof NicGeoPoint)) { return false; } final NicGeoPoint nicGeoPoint = (NicGeoPoint) o; return (((getY() == nicGeoPoint.getY()) && (getX() == nicGeoPoint.getX()) && (divergence == nicGeoPoint.getDivergence()))); } NicGeoPointImpl();  NicGeoPointImpl(final IGeoPoint geoPoint);  NicGeoPointImpl(final int latitudeE6, final int longitudeE6);  NicGeoPointImpl(final double latitude, final double longitude); }
NicGeoPointImpl extends GeoPoint implements NicGeoPoint { @Override public boolean equals(final Object o) { if (o == null) { return false; } if (o == this) { return true; } if (!(o instanceof NicGeoPoint)) { return false; } final NicGeoPoint nicGeoPoint = (NicGeoPoint) o; return (((getY() == nicGeoPoint.getY()) && (getX() == nicGeoPoint.getX()) && (divergence == nicGeoPoint.getDivergence()))); } NicGeoPointImpl();  NicGeoPointImpl(final IGeoPoint geoPoint);  NicGeoPointImpl(final int latitudeE6, final int longitudeE6);  NicGeoPointImpl(final double latitude, final double longitude); @Override double getX(); @Override double getY(); @Override void setXY(final double x, final double y); @Override double calculateDistanceTo(final NicGeoPoint point); @Override double getDivergence(); @Override void setDivergence(double divergence); @Override boolean equals(final Object o); @Override int hashCode(); @Override int compareTo(NicGeoPoint other); @Override String toString(); }
NicGeoPointImpl extends GeoPoint implements NicGeoPoint { @Override public boolean equals(final Object o) { if (o == null) { return false; } if (o == this) { return true; } if (!(o instanceof NicGeoPoint)) { return false; } final NicGeoPoint nicGeoPoint = (NicGeoPoint) o; return (((getY() == nicGeoPoint.getY()) && (getX() == nicGeoPoint.getX()) && (divergence == nicGeoPoint.getDivergence()))); } NicGeoPointImpl();  NicGeoPointImpl(final IGeoPoint geoPoint);  NicGeoPointImpl(final int latitudeE6, final int longitudeE6);  NicGeoPointImpl(final double latitude, final double longitude); @Override double getX(); @Override double getY(); @Override void setXY(final double x, final double y); @Override double calculateDistanceTo(final NicGeoPoint point); @Override double getDivergence(); @Override void setDivergence(double divergence); @Override boolean equals(final Object o); @Override int hashCode(); @Override int compareTo(NicGeoPoint other); @Override String toString();  }