-
- All Superinterfaces:
AddressStringDivisionSeries
,java.io.Serializable
- All Known Subinterfaces:
IPAddressDivisionSeries
,IPAddressSegmentSeries
- All Known Implementing Classes:
IPAddress
,IPAddressDivisionGrouping
,IPAddressLargeDivisionGrouping
,IPAddressSection
,IPv4Address
,IPv4AddressSection
,IPv6Address
,IPv6AddressSection
,IPv6AddressSection.IPv6v4MixedAddressSection
public interface IPAddressStringDivisionSeries extends AddressStringDivisionSeries
A generic part of an IP address for the purpose of producing a string for the address. It is divided into a series of combinations of individual address divisions (AddressDivision
). The number of such series is the division count.- Author:
- sfoley
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description IPAddressStringDivision
getDivision(int index)
IPAddressNetwork<?,?,?,?,?>
getNetwork()
java.lang.Integer
getPrefixLength()
The number of bits in the upper-most portion of the segment bits representing a prefix, while the remaining bits can assume all possible values.boolean
isPrefixBlock()
Returns whether this address section represents a subnet block of addresses corresponding to the prefix of this series.boolean
isPrefixed()
Whether there exists a prefix length-
Methods inherited from interface inet.ipaddr.format.string.AddressStringDivisionSeries
getDivisionCount
-
-
-
-
Method Detail
-
getNetwork
IPAddressNetwork<?,?,?,?,?> getNetwork()
-
getDivision
IPAddressStringDivision getDivision(int index)
- Specified by:
getDivision
in interfaceAddressStringDivisionSeries
-
isPrefixBlock
boolean isPrefixBlock()
Returns whether this address section represents a subnet block of addresses corresponding to the prefix of this series. Returns false if it has no prefix length, if it is a single address with a prefix length (ie not a subnet), or if it is a range of addresses that does not include the entire subnet block for its prefix length. IfAddressNetwork.getPrefixConfiguration()
is set to consider all prefixes as subnets, this returns true for any section with a non-null prefix length.- Returns:
-
isPrefixed
boolean isPrefixed()
Whether there exists a prefix length
-
getPrefixLength
java.lang.Integer getPrefixLength()
The number of bits in the upper-most portion of the segment bits representing a prefix, while the remaining bits can assume all possible values. For an IP address returns the network prefix, which is 16 for an address like 1.2.0.0/16 If there is no prefix length, returns null.- Returns:
- the prefix length or null if there is none
-
-