public interface AddressComponent extends AddressItem
Modifier and Type | Method and Description |
---|---|
int |
getByteCount()
returns the number of bytes in each of the address components represented by this instance
|
java.lang.Iterable<? extends AddressComponent> |
getIterable()
Useful for using an instance in a "for-each loop".
|
AddressComponent |
getLower()
If this instance represents multiple address components, returns the one with the lowest numeric value.
|
AddressComponent |
getUpper()
If this instance represents multiple address components, returns the one with the highest numeric value.
|
java.util.Iterator<? extends AddressComponent> |
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.
|
AddressComponent |
reverseBits(boolean perByte)
Returns a new AddressComponent with the bits reversed.
|
AddressComponent |
reverseBytes()
Returns an AddressComponent with the bytes reversed.
|
java.lang.String |
toHexString(boolean with0xPrefix)
Writes this address component as a single hexadecimal value with always the exact same number of characters, with or without a preceding 0x prefix.
|
java.lang.String |
toNormalizedString()
Produces a string that is somewhat similar for all address components of the same type.
|
getBitCount, getBytes, getBytes, getCount, getUpperBytes, getUpperBytes, isFullRange, isMultiple, isZero
AddressComponent getLower()
AddressComponent getUpper()
int getByteCount()
java.lang.Iterable<? extends AddressComponent> getIterable()
iterator()
directly.java.util.Iterator<? extends AddressComponent> iterator()
AddressItem.isMultiple()
to determine if this instance represents multiple.
This method iterates through the individual elements.java.lang.String toHexString(boolean with0xPrefix)
java.lang.String toNormalizedString()
AddressComponent reverseBits(boolean perByte)
perByte
- if true, only the bits in each byte are reversed, if false, then all bits in the component are reversedAddressComponent reverseBytes()