Skip to content

Commit

Permalink
use Objects.equal
Browse files Browse the repository at this point in the history
  • Loading branch information
cpesch committed Sep 23, 2023
1 parent 8d498d2 commit acc43df
Show file tree
Hide file tree
Showing 38 changed files with 119 additions and 118 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,8 @@ public boolean equals(Object o) {

BoundingBox that = (BoundingBox) o;

return !(!Objects.equals(northEast, that.northEast)) &&
!(!Objects.equals(southWest, that.southWest));
return Objects.equals(northEast, that.northEast) &&
Objects.equals(southWest, that.southWest);
}

public int hashCode() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,12 +144,12 @@ public boolean equals(Object o) {

SimpleNavigationPosition that = (SimpleNavigationPosition) o;

return !(!Objects.equals(description, that.description)) &&
!(!Objects.equals(speed, that.speed)) &&
!(!Objects.equals(elevation, that.elevation)) &&
!(!Objects.equals(latitude, that.latitude)) &&
!(!Objects.equals(longitude, that.longitude)) &&
!(!Objects.equals(time, that.time));
return Objects.equals(description, that.description) &&
Objects.equals(speed, that.speed) &&
Objects.equals(elevation, that.elevation) &&
Objects.equals(latitude, that.latitude) &&
Objects.equals(longitude, that.longitude) &&
Objects.equals(time, that.time);
}

public int hashCode() {
Expand Down
2 changes: 1 addition & 1 deletion common/src/main/java/slash/common/type/ISO8601.java
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
*
* The currently supported format is:
* <pre>
* +-YYY-MM-DDThh:mm:ss[.SSS]TZD
* +-YYYY-MM-DDThh:mm:ss[.SSS]TZD
* </pre>
* where:
* <pre>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,9 @@ public boolean equals(Object o) {

Checksum checksum = (Checksum) o;

return !(!Objects.equals(contentLength, checksum.contentLength)) &&
!(!Objects.equals(lastModified, checksum.lastModified)) &&
!(!Objects.equals(sha1, checksum.sha1));
return Objects.equals(contentLength, checksum.contentLength) &&
Objects.equals(lastModified, checksum.lastModified) &&
Objects.equals(sha1, checksum.sha1);
}

public int hashCode() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ public boolean equals(Object o) {

Download download = (Download) o;

return !(!Objects.equals(url, download.url));
return Objects.equals(url, download.url);
}

public int hashCode() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ public boolean equals(Object o) {

PostalCode that = (PostalCode) o;

return !(!Objects.equals(countryCode, that.countryCode)) &&
!(!Objects.equals(placeName, that.placeName)) &&
!(!Objects.equals(postalCode, that.postalCode));
return Objects.equals(countryCode, that.countryCode) &&
Objects.equals(placeName, that.placeName) &&
Objects.equals(postalCode, that.postalCode);
}

public int hashCode() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ public boolean equals(Object o) {

return Double.compare(that.height, height) == 0 &&
Double.compare(that.right, right) == 0 &&
!(!Objects.equals(description, that.description)) &&
Objects.equals(description, that.description) &&
!(getElevation() != null ? !getElevation().equals(that.getElevation()) : that.getElevation() != null) &&
!(hasTime() ? !getTime().equals(that.getTime()) : that.hasTime());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,10 +123,10 @@ public boolean equals(Object o) {

MercatorPosition that = (MercatorPosition) o;

return !(!Objects.equals(description, that.description)) &&
return Objects.equals(description, that.description) &&
!(getElevation() != null ? !getElevation().equals(that.getElevation()) : that.getElevation() != null) &&
!(!Objects.equals(x, that.x)) &&
!(!Objects.equals(y, that.y)) &&
Objects.equals(x, that.x) &&
Objects.equals(y, that.y) &&
!(hasTime() ? !getTime().equals(that.getTime()) : that.hasTime());
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ public boolean equals(Object o) {

SimpleRoute route = (SimpleRoute) o;

return !(!Objects.equals(name, route.name)) &&
return Objects.equals(name, route.name) &&
getCharacteristics().equals(route.getCharacteristics()) &&
positions.equals(route.positions);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -248,16 +248,16 @@ public boolean equals(Object o) {

Wgs84Position that = (Wgs84Position) o;

return !(!Objects.equals(description, that.description)) &&
return Objects.equals(description, that.description) &&
!(getElevation() != null ? !getElevation().equals(that.getElevation()) : that.getElevation() != null) &&
!(!Objects.equals(heading, that.heading)) &&
!(!Objects.equals(latitude, that.latitude)) &&
!(!Objects.equals(longitude, that.longitude)) &&
Objects.equals(heading, that.heading) &&
Objects.equals(latitude, that.latitude) &&
Objects.equals(longitude, that.longitude) &&
!(hasTime() ? !getTime().equals(that.getTime()) : that.hasTime()) &&
!(!Objects.equals(hdop, that.hdop)) &&
!(!Objects.equals(pdop, that.pdop)) &&
!(!Objects.equals(vdop, that.vdop)) &&
!(!Objects.equals(satellites, that.satellites));
Objects.equals(hdop, that.hdop) &&
Objects.equals(pdop, that.pdop) &&
Objects.equals(vdop, that.vdop) &&
Objects.equals(satellites, that.satellites);
}

public int hashCode() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -163,12 +163,12 @@ public boolean equals(Object o) {
BcrPosition that = (BcrPosition) o;

return altitude == that.altitude &&
!(!Objects.equals(x, that.x)) &&
!(!Objects.equals(y, that.y)) &&
!(!Objects.equals(description, that.description)) &&
!(!Objects.equals(street, that.street)) &&
!(!Objects.equals(type, that.type)) &&
!(!Objects.equals(zipCode, that.zipCode));
Objects.equals(x, that.x) &&
Objects.equals(y, that.y) &&
Objects.equals(description, that.description) &&
Objects.equals(street, that.street) &&
Objects.equals(type, that.type) &&
Objects.equals(zipCode, that.zipCode);
}

public int hashCode() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -310,8 +310,8 @@ public boolean equals(Object o) {
ExcelRoute that = (ExcelRoute) o;

return !(getName() != null ? !getName().equals(that.getName()) : that.getName() != null) &&
!(!Objects.equals(mapping, that.mapping)) &&
!(!Objects.equals(positions, that.positions));
Objects.equals(mapping, that.mapping) &&
Objects.equals(positions, that.positions);
}

public int hashCode() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,8 @@ public boolean equals(Object o) {

GarminFlightPlanPosition that = (GarminFlightPlanPosition) o;

return !(!Objects.equals(countryCode, that.countryCode)) &&
!(!Objects.equals(identifier, that.identifier)) &&
return Objects.equals(countryCode, that.countryCode) &&
Objects.equals(identifier, that.identifier) &&
waypointType == that.waypointType;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -210,8 +210,8 @@ public boolean equals(Object o) {

GarminFlightPlanRoute that = (GarminFlightPlanRoute) o;

return !(!Objects.equals(name, that.name)) &&
!(!Objects.equals(positions, that.positions));
return Objects.equals(name, that.name) &&
Objects.equals(positions, that.positions);
}

public int hashCode() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,15 +125,15 @@ public boolean equals(Object o) {

GoPalPosition that = (GoPalPosition) o;

return !(!Objects.equals(x, that.x)) &&
!(!Objects.equals(y, that.y)) &&
!(!Objects.equals(country, that.country)) &&
!(!Objects.equals(zipCode, that.zipCode)) &&
!(!Objects.equals(description, that.description)) &&
!(!Objects.equals(suburb, that.suburb)) &&
!(!Objects.equals(street, that.street)) &&
!(!Objects.equals(sideStreet, that.sideStreet)) &&
!(!Objects.equals(houseNumber, that.houseNumber));
return Objects.equals(x, that.x) &&
Objects.equals(y, that.y) &&
Objects.equals(country, that.country) &&
Objects.equals(zipCode, that.zipCode) &&
Objects.equals(description, that.description) &&
Objects.equals(suburb, that.suburb) &&
Objects.equals(street, that.street) &&
Objects.equals(sideStreet, that.sideStreet) &&
Objects.equals(houseNumber, that.houseNumber);
}

public int hashCode() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -213,8 +213,8 @@ public boolean equals(Object o) {

GoPalRoute gopalRoute = (GoPalRoute) o;

return !(!Objects.equals(name, gopalRoute.name)) &&
!(!Objects.equals(positions, gopalRoute.positions));
return Objects.equals(name, gopalRoute.name) &&
Objects.equals(positions, gopalRoute.positions);
}

public int hashCode() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -212,17 +212,17 @@ public boolean equals(Object o) {

GpxPosition that = (GpxPosition) o;

return !(!Objects.equals(description, that.description)) &&
return Objects.equals(description, that.description) &&
!(getElevation() != null ? !getElevation().equals(that.getElevation()) : that.getElevation() != null) &&
!(!Objects.equals(heading, that.heading)) &&
!(!Objects.equals(temperature, that.temperature)) &&
!(!Objects.equals(latitude, that.latitude)) &&
!(!Objects.equals(longitude, that.longitude)) &&
Objects.equals(heading, that.heading) &&
Objects.equals(temperature, that.temperature) &&
Objects.equals(latitude, that.latitude) &&
Objects.equals(longitude, that.longitude) &&
!(hasTime() ? !getTime().equals(that.getTime()) : that.hasTime()) &&
!(!Objects.equals(hdop, that.hdop)) &&
!(!Objects.equals(pdop, that.pdop)) &&
!(!Objects.equals(vdop, that.vdop)) &&
!(!Objects.equals(satellites, that.satellites));
Objects.equals(hdop, that.hdop) &&
Objects.equals(pdop, that.pdop) &&
Objects.equals(vdop, that.vdop) &&
Objects.equals(satellites, that.satellites);
}

public int hashCode() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -240,8 +240,8 @@ public boolean equals(Object o) {

final GpxRoute gpxRoute = (GpxRoute) o;

return !(!Objects.equals(description, gpxRoute.description)) &&
!(!Objects.equals(name, gpxRoute.name)) &&
return Objects.equals(description, gpxRoute.description) &&
Objects.equals(name, gpxRoute.name) &&
getCharacteristics().equals(gpxRoute.getCharacteristics()) &&
positions.equals(gpxRoute.positions);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,12 +190,12 @@ public boolean equals(Object o) {

TomTomPosition that = (TomTomPosition) o;

return !(!Objects.equals(city, that.city)) &&
return Objects.equals(city, that.city) &&
!(getElevation() != null ? !getElevation().equals(that.getElevation()) : that.getElevation() != null) &&
!(!Objects.equals(heading, that.heading)) &&
!(!Objects.equals(latitude, that.latitude)) &&
!(!Objects.equals(longitude, that.longitude)) &&
!(!Objects.equals(reason, that.reason)) &&
Objects.equals(heading, that.heading) &&
Objects.equals(latitude, that.latitude) &&
Objects.equals(longitude, that.longitude) &&
Objects.equals(reason, that.reason) &&
!(hasTime() ? !getTime().equals(that.getTime()) : that.hasTime());
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ public boolean equals(Object o) {

TomTomRoute route = (TomTomRoute) o;

return !(!Objects.equals(name, route.name)) &&
return Objects.equals(name, route.name) &&
getCharacteristics().equals(route.getCharacteristics()) &&
positions.equals(route.positions);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -223,8 +223,8 @@ public boolean equals(Object o) {

KlickTelRoute klicktelRoute = (KlickTelRoute) o;

return !(!Objects.equals(name, klicktelRoute.name)) &&
!(!Objects.equals(positions, klicktelRoute.positions));
return Objects.equals(name, klicktelRoute.name) &&
Objects.equals(positions, klicktelRoute.positions);
}

public int hashCode() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ public boolean equals(Object o) {
KmlPosition that = (KmlPosition) o;

return !(getElevation() != null ? !getElevation().equals(that.getElevation()) : that.getElevation() != null) &&
!(!Objects.equals(description, that.description)) &&
!(!Objects.equals(latitude, that.latitude)) &&
!(!Objects.equals(longitude, that.longitude)) &&
Objects.equals(description, that.description) &&
Objects.equals(latitude, that.latitude) &&
Objects.equals(longitude, that.longitude) &&
!(hasTime() ? !getTime().equals(that.getTime()) : that.hasTime());
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -201,8 +201,8 @@ public boolean equals(Object o) {

final KmlRoute kmlRoute = (KmlRoute) o;

return !(!Objects.equals(description, kmlRoute.description)) &&
!(!Objects.equals(name, kmlRoute.name)) &&
return Objects.equals(description, kmlRoute.description) &&
Objects.equals(name, kmlRoute.name) &&
getCharacteristics().equals(kmlRoute.getCharacteristics()) &&
positions.equals(kmlRoute.positions);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -223,8 +223,8 @@ public boolean equals(Object o) {

NokiaLandmarkExchangeRoute other = (NokiaLandmarkExchangeRoute) o;

return !(!Objects.equals(name, other.name)) &&
!(!Objects.equals(positions, other.positions));
return Objects.equals(name, other.name) &&
Objects.equals(positions, other.positions);
}

public int hashCode() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -214,8 +214,8 @@ public boolean equals(Object o) {

final MagicMapsIktRoute magicMapsIktRoute = (MagicMapsIktRoute) o;

return !(!Objects.equals(description, magicMapsIktRoute.description)) &&
!(!Objects.equals(name, magicMapsIktRoute.name)) &&
return Objects.equals(description, magicMapsIktRoute.description) &&
Objects.equals(name, magicMapsIktRoute.name) &&
getCharacteristics().equals(magicMapsIktRoute.getCharacteristics()) &&
positions.equals(magicMapsIktRoute.positions);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -223,8 +223,8 @@ public boolean equals(Object o) {

MSFSFlightPlanRoute other = (MSFSFlightPlanRoute) o;

return !(!Objects.equals(name, other.name)) &&
!(!Objects.equals(positions, other.positions));
return Objects.equals(name, other.name) &&
Objects.equals(positions, other.positions);
}

public int hashCode() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -205,16 +205,16 @@ public boolean equals(Object o) {

NmeaPosition that = (NmeaPosition) o;

return !(!Objects.equals(description, that.description)) &&
return Objects.equals(description, that.description) &&
!(getElevation() != null ? !getElevation().equals(that.getElevation()) : that.getElevation() != null) &&
!(!Objects.equals(heading, that.heading)) &&
!(!Objects.equals(latitude, that.latitude)) &&
!(!Objects.equals(longitude, that.longitude)) &&
Objects.equals(heading, that.heading) &&
Objects.equals(latitude, that.latitude) &&
Objects.equals(longitude, that.longitude) &&
!(hasTime() ? !getTime().equals(that.getTime()) : that.hasTime()) &&
!(!Objects.equals(hdop, that.hdop)) &&
!(!Objects.equals(pdop, that.pdop)) &&
!(!Objects.equals(vdop, that.vdop)) &&
!(!Objects.equals(satellites, that.satellites)); }
Objects.equals(hdop, that.hdop) &&
Objects.equals(pdop, that.pdop) &&
Objects.equals(vdop, that.vdop) &&
Objects.equals(satellites, that.satellites); }

public int hashCode() {
int result;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,12 +112,12 @@ public boolean equals(Object o) {

NmnPosition that = (NmnPosition) o;

return !(!Objects.equals(description, that.description)) &&
!(!Objects.equals(street, that.street)) &&
!(!Objects.equals(number, that.number)) &&
return Objects.equals(description, that.description) &&
Objects.equals(street, that.street) &&
Objects.equals(number, that.number) &&
!(getElevation() != null ? !getElevation().equals(that.getElevation()) : that.getElevation() != null) &&
!(!Objects.equals(latitude, that.latitude)) &&
!(!Objects.equals(longitude, that.longitude)) &&
Objects.equals(latitude, that.latitude) &&
Objects.equals(longitude, that.longitude) &&
!(hasTime() ? !getTime().equals(that.getTime()) : that.hasTime());
}

Expand Down
Loading

0 comments on commit acc43df

Please sign in to comment.