public interface IPAddressRange extends AddressItemRange
| Modifier and Type | Method and Description |
|---|---|
boolean |
contains(IPAddress other)
Returns whether this range contains all addresses in the given address or subnet
|
boolean |
contains(IPAddressSeqRange other)
Returns whether this range contains all addresses in the given sequential range
|
java.lang.Iterable<? extends IPAddress> |
getIterable()
Useful for using an instance in a "for-each loop", as in
for(addr : address.getIterable()) { ... |
IPAddress |
getLower()
If this instance represents multiple individual addresses, returns the one with the lowest numeric value.
|
IPAddress |
getUpper()
If this instance represents multiple individual addresses, returns the one with the highest numeric value.
|
java.util.Iterator<? extends IPAddress> |
iterator()
Iterates through the individual addresses of this address or subnet.
|
java.util.Iterator<? extends IPAddress> |
prefixBlockIterator(int prefLength)
Iterates through the range of prefix blocks in this range instance using the given prefix length.
|
java.util.Iterator<? extends IPAddressRange> |
prefixIterator(int prefixLength)
Iterates through the range of prefixes in this range instance using the given prefix length.
|
IPAddress[] |
spanWithPrefixBlocks()
Produces an array of prefix blocks that cover the same set of addresses.
|
IPAddress[] |
spanWithSequentialBlocks()
Produces an array of blocks that are sequential that cover the same set of addresses.
|
java.lang.String |
toCanonicalString()
Produces a string that is unique and uses the canonical representation for all instances.
|
java.lang.String |
toNormalizedString()
Produces a string that is unique and consistent for all instances.
|
compareTo, containsPrefixBlock, containsSinglePrefixBlock, getBitCount, getByteCount, getBytes, getBytes, getBytes, getCount, getMinPrefixLengthForBlock, getPrefixCount, getPrefixLengthForSingleBlock, getUpperBytes, getUpperBytes, getUpperBytes, getUpperValue, getValue, includesMax, includesZero, isFullRange, isMax, isMultiple, isZero, testRange, testRangeboolean contains(IPAddressSeqRange other)
other - boolean contains(IPAddress other)
other - IPAddress getLower()
getLower in interface AddressItemRangeIPAddress getUpper()
getUpper in interface AddressItemRangejava.lang.Iterable<? extends IPAddress> getIterable()
for(addr : address.getIterable()) { ... }
Otherwise just call iterator() directly.
getIterable in interface AddressItemRangejava.util.Iterator<? extends IPAddress> iterator()
Call AddressItem.isMultiple() to determine if this instance represents multiple, or AddressItem.getCount() for the count.
iterator in interface AddressItemRangejava.util.Iterator<? extends IPAddress> prefixBlockIterator(int prefLength)
prefLength - java.util.Iterator<? extends IPAddressRange> prefixIterator(int prefixLength)
prefixLength - IPAddress[] spanWithPrefixBlocks()
IPAddress[] spanWithSequentialBlocks()
spanWithPrefixBlocks() and is never longer.java.lang.String toNormalizedString()
java.lang.String toCanonicalString()