@Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!this.getClass().isInstance(obj)) { return false; } IcmpV4RedirectHeader other = (IcmpV4RedirectHeader) obj; return gatewayInternetAddress.equals(other.gatewayInternetAddress); }
@Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!this.getClass().isInstance(obj)) { return false; } TimestampWithAddress other = (TimestampWithAddress) obj; return this.timestamp.equals(other.timestamp) && this.address.equals(other.address); }
@Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } DnsRDataA dnsRDataA = (DnsRDataA) o; if (addressPlainText != dnsRDataA.addressPlainText) { return false; } return address.equals(dnsRDataA.address); }
@Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } DnsRDataWks other = (DnsRDataWks) obj; if (!address.equals(other.address)) { return false; } if (!Arrays.equals(bitMap, other.bitMap)) { return false; } if (!protocol.equals(other.protocol)) { return false; } return true; }
@Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!this.getClass().isInstance(obj)) { return false; } IpV4Header other = (IpV4Header) obj; return identification == other.identification && headerChecksum == other.headerChecksum && srcAddr.equals(other.srcAddr) && dstAddr.equals(other.dstAddr) && totalLength == other.totalLength && protocol.equals(other.protocol) && ttl == other.ttl && fragmentOffset == other.fragmentOffset && reservedFlag == other.reservedFlag && dontFragmentFlag == other.dontFragmentFlag && moreFragmentFlag == other.moreFragmentFlag && tos.equals(other.tos) && ihl == other.ihl && version.equals(other.version) && options.equals(other.options) && Arrays.equals(padding, other.padding); }
@Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!this.getClass().isInstance(obj)) { return false; } IcmpV4RedirectHeader other = (IcmpV4RedirectHeader) obj; return gatewayInternetAddress.equals(other.gatewayInternetAddress); }
@Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } DnsRDataA dnsRDataA = (DnsRDataA) o; if (addressPlainText != dnsRDataA.addressPlainText) { return false; } return address.equals(dnsRDataA.address); }
@Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!this.getClass().isInstance(obj)) { return false; } TimestampWithAddress other = (TimestampWithAddress) obj; return this.timestamp.equals(other.timestamp) && this.address.equals(other.address); }
@Override @SuppressWarnings({"RedundantIfStatement"}) public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } Inet4Network that = (Inet4Network) o; if (bits != that.bits) { return false; } if (!address.equals(that.address)) { return false; } return true; }
@Override @SuppressWarnings("RedundantIfStatement") public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } Inet4Network that = (Inet4Network) o; if (bits != that.bits) { return false; } if (!address.equals(that.address)) { return false; } return true; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; PCE_ID_TLV other = (PCE_ID_TLV) obj; if (addresType != other.addresType) return false; if (pceId == null) { if (other.pceId != null) return false; } else if (!pceId.equals(other.pceId)) return false; return true; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; DomainIDTLV other = (DomainIDTLV) obj; if (domainId == null) { if (other.domainId != null) return false; } else if (!domainId.equals(other.domainId)) return false; if (domainType != other.domainType) return false; return true; }
@Override public boolean equals(Object obj) { return remoteASNumber.equals(((RemoteASNumber) obj).getRemoteASNumber()); } @Override
@Override public boolean equals(Object obj) { return iPv4RemoteASBRID.equals(((IPv4RemoteASBRID) obj).getIPv4RemoteASBRID()); } @Override
@Override public boolean equals(Object obj) { if (this == obj) return true; if (!super.equals(obj)) return false; if (getClass() != obj.getClass()) return false; PccReqId other = (PccReqId) obj; if (PCCIpAddress == null) { if (other.PCCIpAddress != null) return false; } else if (!PCCIpAddress.equals(other.PCCIpAddress)) return false; return true; }
/** * @param inet4Address * inet4Address * @return boolean boolean */ public static boolean isConfigured(Inet4Address inet4Address) { if (inet4Address == null) return false; try { if (inet4Address.equals(Inet4Address.getByName("0.0.0.0"))) return false; } catch (UnknownHostException e) { LOG.debug("UnknownHostException", e); return false; } return true; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (!super.equals(obj)) return false; if (getClass() != obj.getClass()) return false; PceIdIPv4 other = (PceIdIPv4) obj; if (pceIPAddress == null) { if (other.pceIPAddress != null) return false; } else if (!pceIPAddress.equals(other.pceIPAddress)) return false; return true; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (!super.equals(obj)) return false; if (getClass() != obj.getClass()) return false; TNAIPv4SubTLV other = (TNAIPv4SubTLV) obj; if (Addr_length != other.Addr_length) return false; if (IPv4address == null) { if (other.IPv4address != null) return false; } else if (!IPv4address.equals(other.IPv4address)) return false; return true; }
/** Finds a Peer connection by its ID. */ private Peer getPeer(Inet4Address id) { return peers.stream().filter(p -> p.getID().equals(id)).findFirst().orElse(null); }
public static boolean matchesDestination( Packet packet, Inet4Address addr, Inet4Address subnetmask ) { IpV4Packet ipv4Packet = packet.get(IpV4Packet.class); if (ipv4Packet == null) { throw new IllegalArgumentException(packet.toString()); } Inet4Address dstAddr = ipv4Packet.getHeader().getDstAddr(); if (dstAddr.equals(addr)) { return true; } if (!isSameNetwork(addr, dstAddr, subnetmask)) { return false; } return isBroadcastAddr(dstAddr, subnetmask); }