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 includesMax() 
      boolean includesZero() 
      boolean isFullRange() 
      boolean isMax() 
      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 comprising this address 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 matches the value of zero
      • includesZero

        boolean includesZero()
        Returns:
        whether this item includes the value of zero within its range
      • isMax

        boolean isMax()
        Returns:
        whether this item matches the maximum possible value
      • includesMax

        boolean includesMax()
        Returns:
        whether this item includes the maximum possible value within its range
      • isFullRange

        boolean isFullRange()
        Returns:
        whether this address item represents all possible values attainable by an address item of this type, or in other words, both includesZero() and includesMax() return true