mirror of
https://github.com/hierynomus/sshj.git
synced 2025-12-08 08:10:55 +03:00
Merge branch 'master' of github.com:informaticum/sshj into informaticum-master
This commit is contained in:
@@ -15,6 +15,8 @@
|
||||
*/
|
||||
package net.schmizz.sshj.connection.channel.direct;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
public class Parameters {
|
||||
|
||||
private final String localHost;
|
||||
@@ -45,4 +47,24 @@ public class Parameters {
|
||||
return localPort;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
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;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "Parameters [localHost=" + localHost + ", localPort=" + localPort + ", "+
|
||||
"remoteHost=" + remoteHost + ", remotePort=" + remotePort + "]";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user