protected static boolean isConsecutive(IPPollRange range, IPPollRange address) { Preconditions.checkState(BigInteger.ONE.equals(address.getAddressRange().size())); return range != null && new IPAddress(range.getAddressRange().getEnd()).isPredecessorOf(new IPAddress(address.getAddressRange().getEnd())) && Objects.equals(range.getForeignSource(), address.getForeignSource()) && Objects.equals(range.getLocation(), address.getLocation()) && range.getRetries() == address.getRetries() && range.getTimeout() == address.getTimeout(); }
protected static boolean isConsecutive(IPPollRange range, IPPollRange address) { Preconditions.checkState(BigInteger.ONE.equals(address.getAddressRange().size())); return range != null && new IPAddress(range.getAddressRange().getEnd()).isPredecessorOf(new IPAddress(address.getAddressRange().getEnd())) && Objects.equals(range.getForeignSource(), address.getForeignSource()) && Objects.equals(range.getLocation(), address.getLocation()) && range.getRetries() == address.getRetries() && range.getTimeout() == address.getTimeout(); }