private boolean isInRange(int address) { int diff = address - low(); return (diff >= 0 && (diff <= (high() - low()))); }
private boolean isInRange(int address) { int diff = address - low(); return (diff >= 0 && (diff <= (high() - low()))); }
/** * Return the high address as a dotted IP address. * Will be zero for CIDR/31 and CIDR/32 if the inclusive flag is false. * * @return the IP address in dotted format, may be "0.0.0.0" if there is no valid address */ public String getHighAddress() { return format(toArray(high())); }
public String[] getAllAddresses() { int ct = getAddressCount(); String[] addresses = new String[ct]; if (ct == 0) { return addresses; } for (int add = low(), j=0; add <= high(); ++add, ++j) { addresses[j] = format(toArray(add)); } return addresses; }
/** * Return the high address as a dotted IP address. * Will be zero for CIDR/31 and CIDR/32 if the inclusive flag is false. * * @return the IP address in dotted format, may be "0.0.0.0" if there is no valid address */ public String getHighAddress() { return format(toArray(high())); }
public String[] getAllAddresses() { int ct = getAddressCount(); String[] addresses = new String[ct]; if (ct == 0) { return addresses; } for (int add = low(), j=0; add <= high(); ++add, ++j) { addresses[j] = format(toArray(add)); } return addresses; }