public interface IPAddressRange extends AddressComponentRange
| 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
|
IPAddress |
coverWithPrefixBlock()
Returns the minimal-size prefix block that covers all the addresses in this range.
|
Iterable<? extends IPAddress> |
getIterable()
Useful for using an instance in a "for-each loop", as in
for(addr : address.getIterable()) { ... |
IPAddress |
getLower()
Returns the address in the range with the lowest numeric value.
|
IPAddress |
getUpper()
Returns the address in the range with the highest numeric value.
|
boolean |
isSequential()
Returns whether this range represents a range of values that are sequential.
|
Iterator<? extends IPAddress> |
iterator()
Iterates through the individual addresses of this address or subnet.
|
Iterator<? extends IPAddress> |
prefixBlockIterator(int prefLength)
Iterates through the range of prefix blocks in this range instance using the given prefix length.
|
AddressComponentRangeSpliterator<? extends IPAddressRange,? extends IPAddress> |
prefixBlockSpliterator(int prefLength)
Partitions and traverses through the individual prefix blocks for the given prefix length.
|
Stream<? extends IPAddress> |
prefixBlockStream(int prefLength)
Returns a sequential stream of the prefix blocks for the given prefix length.
|
Iterator<? extends IPAddressRange> |
prefixIterator(int prefixLength)
Iterates through the range of prefixes in this range instance using the given prefix length.
|
AddressComponentSpliterator<? extends IPAddressRange> |
prefixSpliterator(int prefLength)
Partitions and traverses through the individual prefixes for the given prefix length.
|
Stream<? extends IPAddressRange> |
prefixStream(int prefLength)
Returns a sequential stream of the individual prefixes for the given prefix length.
|
IPAddress[] |
spanWithPrefixBlocks()
Produces an array of prefix blocks that spans the same set of addresses.
|
IPAddress[] |
spanWithSequentialBlocks()
Produces an array of blocks that are sequential that cover the same set of addresses.
|
AddressComponentRangeSpliterator<? extends IPAddressRange,? extends IPAddress> |
spliterator()
Partitions and traverses through the individual addresses.
|
String |
toCanonicalString()
Produces a string that is unique and uses the canonical representation for all instances.
|
String |
toNormalizedString()
Produces a string that is unique and consistent for all instances.
|
IPAddressSeqRange |
toSequentialRange()
Converts to a sequential range from the lowest and highest addresses in this range, returns "this" if one already
|
stream, stream, streamcompareTo, containsPrefixBlock, containsSinglePrefixBlock, getBitCount, getByteCount, getBytes, getBytes, getBytes, getCount, getMinPrefixLengthForBlock, getPrefixCount, getPrefixLengthForSingleBlock, getUpperBytes, getUpperBytes, getUpperBytes, getUpperValue, getValue, includesMax, includesZero, isFullRange, isMax, isMultiple, isZeroboolean contains(IPAddressSeqRange other)
other - boolean contains(IPAddress other)
other - IPAddress getLower()
getLower in interface AddressComponentRangeIPAddress getUpper()
getUpper in interface AddressComponentRangeIterable<? extends IPAddress> getIterable()
for(addr : address.getIterable()) { ... }
Otherwise just call iterator() directly.
getIterable in interface AddressComponentRangeIterator<? extends IPAddress> iterator()
Call AddressItem.isMultiple() to determine if this instance represents multiple, or AddressItem.getCount() for the count.
iterator in interface AddressComponentRangeAddressComponentRangeSpliterator<? extends IPAddressRange,? extends IPAddress> spliterator()
spliterator in interface AddressComponentRangeIterator<? extends IPAddress> prefixBlockIterator(int prefLength)
prefLength - AddressComponentRangeSpliterator<? extends IPAddressRange,? extends IPAddress> prefixBlockSpliterator(int prefLength)
Stream<? extends IPAddress> prefixBlockStream(int prefLength)
BaseStream.parallel() on the returned stream.Iterator<? extends IPAddressRange> prefixIterator(int prefixLength)
prefixLength - AddressComponentSpliterator<? extends IPAddressRange> prefixSpliterator(int prefLength)
Stream<? extends IPAddressRange> prefixStream(int prefLength)
BaseStream.parallel() on the returned stream.IPAddress coverWithPrefixBlock()
IPAddress[] spanWithPrefixBlocks()
IPAddress[] spanWithSequentialBlocks()
spanWithPrefixBlocks() and is never longer.boolean isSequential()
IPAddressSeqRange toSequentialRange()
The result will represent the same set of addresses if and only if isSequential() is true
String toNormalizedString()
String toCanonicalString()