inet.ipaddr.format

Interface AddressItem

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method and Description
      int getBitCount() 
      byte[] getBytes() 
      byte[] getBytes(byte[] bytes)
      Copies the bytes of the smallest address item represented by this address item into the supplied array, and returns that array.
      java.math.BigInteger getCount()
      The count of possible distinct values for this AddressComponent.
      byte[] getUpperBytes() 
      byte[] getUpperBytes(byte[] bytes)
      Copies the bytes of the largest address item represented by this address item into the supplied array, and returns that array.
      boolean isFullRange() 
      boolean isMultiple()
      Whether this represents multiple potential values (eg a prefixed address or a segment representing a range of values)
      boolean isZero() 
    • Method Detail

      • getCount

        java.math.BigInteger getCount()
        The count of possible distinct values for this AddressComponent. If not multiple, this is 1. For instance, if this is the ip address series subnet 0::/64, then the count is 2 to the power of 64. If this is a the segment 3-7, then the count is 5.
        Returns:
      • getBitCount

        int getBitCount()
        Returns:
        the number of bits in this item
      • isMultiple

        boolean isMultiple()
        Whether this represents multiple potential values (eg a prefixed address or a segment representing a range of values)
      • getBytes

        byte[] getBytes()
        Returns:
        the bytes of the smallest address item represented by this address item
      • getBytes

        byte[] getBytes(byte[] bytes)
        Copies the bytes of the smallest address item represented by this address item into the supplied array, and returns that array. If the supplied array is null or of insufficient size, a new array is created and returned.
        Returns:
        the bytes of the smallest address represented by this address item.
      • getUpperBytes

        byte[] getUpperBytes()
        Returns:
        the bytes of the largest address item represented by this address item
      • getUpperBytes

        byte[] getUpperBytes(byte[] bytes)
        Copies the bytes of the largest address item represented by this address item into the supplied array, and returns that array. If the supplied array is null or of insufficient size, a new array is created and returned.
        Returns:
        the bytes of the largest address represented by this address item.
      • isZero

        boolean isZero()
        Returns:
        whether this item has the value of zero
      • isFullRange

        boolean isFullRange()
        Returns:
        whether this address item represents all possible values attainable by an address item of this type.