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 representing all segment series starting with the same prefix.
|
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 instance represents multiple address components, returns the one with the lowest numeric value.
|
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 instance represents multiple address components, returns the one with the highest numeric value.
|
java.util.Iterator<? extends AddressSection> |
iterator()
An address component can represent a single segment, address, or section, or it can represent multiple,
typically a subnet or range of segment, address, or section values.
|
AddressSection |
removePrefixLength()
Removes the prefix.
|
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, getSegment, getSegmentCount, getSegments, getSegments, getSegments, segmentsIterator, toCanonicalString, toCompressedString
getDivision, getEquivalentPrefix, getMinPrefix, getPrefixLength, isMore, isMultipleByPrefix, isPrefixed, isRangeEquivalentToPrefix
getDivisionCount
getByteCount, toHexString, toNormalizedString
getBitCount, getBytes, getBytes, getCount, getUpperBytes, getUpperBytes, isFullRange, isMultiple, isZero
boolean contains(AddressSection other)
other
- AddressSection getSection(int index)
AddressSegmentSeries
getSection
in interface AddressSegmentSeries
AddressSection getSection(int index, int endIndex)
AddressSegmentSeries
getSection
in interface AddressSegmentSeries
AddressSection getLower()
AddressComponent
getLower
in interface AddressComponent
getLower
in interface AddressSegmentSeries
AddressSection getUpper()
AddressComponent
getUpper
in interface AddressComponent
getUpper
in interface AddressSegmentSeries
AddressSection reverseSegments()
AddressSegmentSeries
reverseSegments
in interface AddressSegmentSeries
AddressSection reverseBits(boolean perByte)
AddressSegmentSeries
reverseBits
in interface AddressComponent
reverseBits
in interface AddressSegmentSeries
perByte
- if true, only the bits in each byte are reversed, if false, then all bits in the component are reversedAddressSection reverseBytes()
AddressSegmentSeries
reverseBytes
in interface AddressComponent
reverseBytes
in interface AddressSegmentSeries
AddressSection reverseBytesPerSegment()
AddressSegmentSeries
reverseBytesPerSegment
in interface AddressSegmentSeries
AddressSection removePrefixLength()
AddressSegmentSeries
removePrefixLength
in interface AddressSegmentSeries
AddressSection adjustPrefixBySegment(boolean nextSegment)
AddressSegmentSeries
adjustPrefixBySegment
in interface AddressSegmentSeries
AddressSection adjustPrefixLength(int adjustment)
AddressSegmentSeries
adjustPrefixLength
in interface AddressSegmentSeries
AddressSection setPrefixLength(int prefixLength)
AddressSegmentSeries
setPrefixLength
in interface AddressSegmentSeries
AddressSection applyPrefixLength(int networkPrefixLength)
AddressSegmentSeries
applyPrefixLength
in interface AddressSegmentSeries
java.lang.Iterable<? extends AddressSection> getIterable()
AddressComponent
AddressComponent.iterator()
directly.getIterable
in interface AddressComponent
getIterable
in interface AddressSegmentSeries
java.util.Iterator<? extends AddressSection> iterator()
AddressComponent
AddressItem.isMultiple()
to determine if this instance represents multiple.
This method iterates through the individual elements.iterator
in interface AddressComponent
iterator
in interface AddressSegmentSeries