inet.ipaddr

Class IPAddressSegment

    • Method Detail

      • isIPv4

        public boolean isIPv4()
      • isIPv6

        public boolean isIPv6()
      • getMinPrefix

        public int getMinPrefix()
      • isMaskCompatibleWithRange

        public boolean isMaskCompatibleWithRange(IPAddressSegment maskSegment,
                                                 java.lang.Integer segmentPrefixLength)
      • isMaskCompatibleWithRange

        public boolean isMaskCompatibleWithRange(int maskValue,
                                                 java.lang.Integer segmentPrefix)
      • getLower

        public abstract IPAddressSegment getLower()
        If this segment represents a range of values, returns a segment representing just the lowest value in the range, otherwise returns this.
        Returns:
      • getUpper

        public abstract IPAddressSegment getUpper()
        If this segment represents a range of values, returns a segment representing just the highest value in the range, otherwise returns this.
        Returns:
      • iterator

        public abstract java.util.Iterator<? extends IPAddressSegment> iterator()
      • getDefaultTextualRadix

        public static int getDefaultTextualRadix(IPAddress.IPVersion version)
      • matches

        public boolean matches(int value)
      • matchesWithPrefix

        public boolean matchesWithPrefix(int value,
                                         java.lang.Integer segmentPrefixLength)
      • matchesWithMask

        public boolean matchesWithMask(int value,
                                       int mask)
      • getMaxValue

        public long getMaxValue()
      • getMaxSegmentValue

        public abstract int getMaxSegmentValue()
      • isMultiple

        public boolean isMultiple()
        Overrides:
        isMultiple in class IPAddressDivision
        Returns:
        whether this segment represents multiple values
      • getLowerSegmentValue

        public int getLowerSegmentValue()
        returns the lower value
      • getUpperSegmentValue

        public int getUpperSegmentValue()
        returns the upper value
      • getSegmentPrefixLength

        public java.lang.Integer getSegmentPrefixLength()
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • contains

        public boolean contains(IPAddressSegment other)
        Parameters:
        other -
        Returns:
        whether this subnet segment contains the given address segment
      • isFullRange

        public static boolean isFullRange(int lower,
                                          int upper,
                                          java.lang.Integer prefix,
                                          IPAddress.IPVersion version)
      • isFullRange

        public static boolean isFullRange(int lower,
                                          int upper,
                                          IPAddress.IPVersion version)