mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2024-12-23 14:52:24 +00:00
reimplement VirtualNetworkDNS.equals
This commit is contained in:
parent
b8b8e58586
commit
686561dc5b
@ -14,9 +14,28 @@ public class VirtualNetworkDNS implements Comparable<VirtualNetworkDNS> {
|
||||
|
||||
public VirtualNetworkDNS() {}
|
||||
|
||||
public boolean equals(VirtualNetworkDNS o) {
|
||||
if (o == null) return false;
|
||||
return domain.equals(o.domain) && servers.equals(o.servers);
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
|
||||
if (o == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!(o instanceof VirtualNetworkDNS)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
VirtualNetworkDNS d = (VirtualNetworkDNS) o;
|
||||
|
||||
if (!domain.equals(d.domain)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!servers.equals(d.servers)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Loading…
Reference in New Issue
Block a user