Skip to content

Commit

Permalink
Implement equals for ExternalConnection schema
Browse files Browse the repository at this point in the history
Co-authored-by: Lovesh Baya <[email protected]>
  • Loading branch information
IshikaDawda and lovesh-ap committed Jul 18, 2024
1 parent 03d1107 commit 44e9ba0
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,15 @@ public boolean isEmpty() {
return false;
}

@Override
public boolean equals(Object obj) {
if (obj instanceof ExternalConnection) {
ExternalConnection connection = (ExternalConnection) obj;
return Objects.equals(host, connection.host) && Objects.equals(port, connection.port) && Objects.equals(connectionUrl, connection.connectionUrl) && Objects.equals(type, connection.type);
}
return false;
}

@Override
public int hashCode() {
return Objects.hash(host, port, connectionUrl, type);
Expand Down

0 comments on commit 44e9ba0

Please sign in to comment.