Module inet.ipaddr
Package inet.ipaddr

Class IPAddressNetwork<T extends IPAddress,​R extends IPAddressSection,​E extends IPAddressSection,​S extends IPAddressSegment,​J extends java.net.InetAddress>

    • Method Detail

      • isIPv4

        public boolean isIPv4()
      • isIPv6

        public boolean isIPv6()
      • getLoopback

        public T getLoopback()
      • getStandardLoopbackStrings

        public java.lang.String[] getStandardLoopbackStrings()
      • getSegmentNetworkMask

        public int getSegmentNetworkMask​(int segmentPrefixLength)
      • getSegmentHostMask

        public int getSegmentHostMask​(int segmentPrefixLength)
      • getNetworkMask

        public T getNetworkMask​(int networkPrefixLength)
        The tne network mask is a single address with zeros corresponding to the host section of the address. It may or may not include the prefix length of the network.
        Parameters:
        networkPrefixLength -
        Returns:
      • getNetworkAddress

        public T getNetworkAddress​(int networkPrefixLength)
        The network address is the subnet of all address with the same network mask. For example, 1.2.0.0/16 is a network address when it includes all addresses 1.2.*.*, rather than just being the single address, the mask 1.2.0.0

        Parameters:
        networkPrefixLength -
        Returns:
      • getNetworkMask

        public T getNetworkMask​(int networkPrefixLength,
                                boolean withPrefixLength)
      • getNetworkMaskSection

        public R getNetworkMaskSection​(int networkPrefixLength)
      • getHostMask

        public T getHostMask​(int networkPrefixLength)
      • getHostMaskSection

        public R getHostMaskSection​(int networkPrefixLength)
      • getPrefixString

        public static java.lang.String getPrefixString​(int networkPrefixLength)