mirror of
https://github.com/hierynomus/sshj.git
synced 2025-12-06 23:30:55 +03:00
Adding #equals to Parameters (#653)
This commit is contained in:
@@ -52,4 +52,13 @@ public class Parameters {
|
||||
return Objects.hash(localHost, localPort, remoteHost, remotePort);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if (this == obj) { return true; }
|
||||
if (!(obj instanceof Parameters)) { return false; }
|
||||
Parameters other = (Parameters) obj;
|
||||
return Objects.equals(localHost, other.localHost) && localPort == other.localPort &&
|
||||
Objects.equals(remoteHost, other.remoteHost) && remotePort == other.remotePort;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user