inet.ipaddr.format

Class IPAddressDivisionGrouping

  • All Implemented Interfaces:
    AddressDivisionSeries, AddressItem, AddressStringDivisionSeries, IPAddressStringDivisionSeries, java.io.Serializable, java.lang.Comparable<AddressDivisionGrouping>
    Direct Known Subclasses:
    IPAddressSection, IPv6AddressSection.IPv6v4MixedAddressSection


    public class IPAddressDivisionGrouping
    extends AddressDivisionGrouping
    implements IPAddressStringDivisionSeries
    IPAddressDivisionGrouping objects consist of a series of IPAddressDivision objects, each division containing one or more segments.

    With the IPAddressSection subclass, each division is one segment (eg either groupings of 4 like 1.2.3.4 or groupings of 8 like 1:2:3:4:5:6:7:8).

    For IPv6, a compressed segment still counts as one of the groupings, it is simply not printed as part of the text representation.

    Alternative groupings include ipv4 groupings define by inet_aton (eg groupings of 1, 2, or 3 divisions like 1, 1.2, and 1.2.3) and the mixed ipv6/ipv4 representation of ipv6 addresses (eg a grouping of 10 divisions like a:b:c:d:e:f:1.2.3.4)

    IPAddressDivisionGrouping objects are immutable. Some of the derived state is created upon demand and cached. This also makes them thread-safe.

    IPAddressDivisionGrouping objects may be associated with a prefix length, in which case that number of bits in the upper-most portion of the object represent a prefix, while the remaining bits assume all possible values.

    See Also:
    Serialized Form