public interface AddressSection extends AddressSegmentSeries
| Modifier and Type | Method and Description |
|---|---|
AddressSection |
adjustPrefixBySegment(boolean nextSegment)
Increases or decreases prefix length to the next segment boundary.
|
AddressSection |
adjustPrefixLength(int adjustment)
Increases or decreases prefix length by the given increment.
|
AddressSection |
applyPrefixLength(int networkPrefixLength)
Applies the given prefix length to create a new segment series.
|
boolean |
contains(AddressSection other)
Determines if one section contains another.
|
java.lang.Iterable<? extends AddressSection> |
getIterable()
Useful for using an instance in a "for-each loop".
|
AddressSection |
getLower()
If this represents a series with ranging values, returns a series representing the lower values of the range.
|
AddressSection |
getSection(int index)
Gets the subsection from the series starting from the given index
|
AddressSection |
getSection(int index,
int endIndex)
Gets the subsection from the series starting from the given index and ending just before the give endIndex
|
AddressSection |
getUpper()
If this represents a series with ranging values, returns a series representing the upper values of the range
If this represents a series with a single value in each segment, returns this.
|
java.util.Iterator<? extends AddressSection> |
iterator()
Iterates through the individual segment series.
|
AddressSection |
removePrefixLength()
Removes the prefix length.
|
AddressSection |
reverseBits(boolean perByte)
Returns a new segment series with the bits reversed.
|
AddressSection |
reverseBytes()
Returns a new segment series with the bytes reversed.
|
AddressSection |
reverseBytesPerSegment()
Returns a new segment series with the bytes reversed within each segment.
|
AddressSection |
reverseSegments()
Returns a new segment series with the segments reversed.
|
AddressSection |
setPrefixLength(int prefixLength)
Sets the prefix length.
|
getBitsPerSegment, getBytesPerSegment, getNetwork, getSegment, getSegmentCount, getSegments, getSegments, getSegments, getSegmentStrings, segmentsIterator, toCanonicalString, toCompressedString, toPrefixBlockgetDivision, getDivisionStrings, getMinPrefixLengthForBlock, getPrefixLength, getPrefixLengthForSingleBlock, getUpperValue, getValue, isMore, isPrefixBlock, isPrefixed, isSinglePrefixBlockgetDivisionCountgetByteCount, toHexString, toNormalizedStringgetBitCount, getBytes, getBytes, getCount, getUpperBytes, getUpperBytes, isFullRange, isMultiple, isZeroboolean contains(AddressSection other)
other - AddressSection getSection(int index)
AddressSegmentSeriesgetSection in interface AddressSegmentSeriesAddressSection getSection(int index, int endIndex)
AddressSegmentSeriesgetSection in interface AddressSegmentSeriesAddressSection getLower()
AddressSegmentSeriesgetLower in interface AddressComponentgetLower in interface AddressSegmentSeriesAddressSection getUpper()
AddressSegmentSeriesgetUpper in interface AddressComponentgetUpper in interface AddressSegmentSeriesAddressSection reverseSegments()
AddressSegmentSeriesIncompatibleAddressException since all address series can reverse their segments.reverseSegments in interface AddressSegmentSeriesAddressSection reverseBits(boolean perByte)
AddressSegmentSeriesreverseBits in interface AddressComponentreverseBits in interface AddressSegmentSeriesperByte - if true, only the bits in each byte are reversed, if false, then all bits in the component are reversedAddressSection reverseBytes()
AddressSegmentSeriesreverseBytes in interface AddressComponentreverseBytes in interface AddressSegmentSeriesAddressSection reverseBytesPerSegment()
AddressSegmentSeriesreverseBytesPerSegment in interface AddressSegmentSeriesAddressSection removePrefixLength()
AddressSegmentSeriesIf the series already has a prefix length, the bits previously not within the prefix become zero.
removePrefixLength in interface AddressSegmentSeriesAddressSection adjustPrefixBySegment(boolean nextSegment)
AddressSegmentSeriesWhen prefix length is increased, the bits moved within the prefix become zero. When a prefix length is decreased, whether the bits moved outside the prefix become zero is dependent on the address type.
adjustPrefixBySegment in interface AddressSegmentSeriesAddressSection adjustPrefixLength(int adjustment)
AddressSegmentSeriesWhen prefix length is increased, the bits moved within the prefix become zero. When the prefix is extended beyond the segment series boundary, it is removed. When a prefix length is decreased, whether the bits moved outside the prefix become zero is dependent on the address type.
adjustPrefixLength in interface AddressSegmentSeriesAddressSection setPrefixLength(int prefixLength)
AddressSegmentSeriesIf this series has a prefix length, and the prefix length is increased, the bits moved within the prefix become zero.
When the prefix is extended beyond the segment series boundary, it is removed.
When a prefix length is decreased, whether the bits moved outside the prefix become zero is dependent on the address type.
setPrefixLength in interface AddressSegmentSeriesAddressSegmentSeries.applyPrefixLength(int)AddressSection applyPrefixLength(int networkPrefixLength)
AddressSegmentSeries
Similar to AddressSegmentSeries.setPrefixLength(int) except that prefix lengths are never increased.
When this series already has a prefix length that is less than or equal to the requested prefix length, this series is returned.
Otherwise the returned series has the given prefix length.
With some address types, the bits moved outside the prefix will become zero in the returned series.
applyPrefixLength in interface AddressSegmentSeriesAddressSegmentSeries.setPrefixLength(int)java.lang.Iterable<? extends AddressSection> getIterable()
AddressComponentAddressComponent.iterator() directly.getIterable in interface AddressComponentgetIterable in interface AddressSegmentSeriesjava.util.Iterator<? extends AddressSection> iterator()
AddressSegmentSeriesiterator in interface AddressComponentiterator in interface AddressSegmentSeries