Package hudson.model

Class Fingerprint.RangeSet

    • Constructor Detail

      • RangeSet

        public RangeSet()
    • Method Detail

      • listNumbers

        public Iterable<Integer> listNumbers()
        List all numbers in this range set, in the ascending order.
      • listNumbersReverse

        public Iterable<Integer> listNumbersReverse()
        List all numbers in this range set in the descending order.
      • add

        public void add​(int n)
        Expands the range set to include the given value. If the set already includes this number, this will be a no-op.
      • addAll

        public void addAll​(int... n)
      • includes

        public boolean includes​(int i)
      • retainAll

        public boolean retainAll​(Fingerprint.RangeSet that)
        Updates this range set by the intersection of this range and the given range.
        Returns:
        true if this range set was modified as a result.
      • removeAll

        public boolean removeAll​(Fingerprint.RangeSet that)
        Updates this range set by removing all the values in the given range set.
        Returns:
        true if this range set was modified as a result.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • isEmpty

        public boolean isEmpty()
      • min

        public int min()
        Returns the smallest value in this range.

        If this range is empty, this method throws an exception.

      • max

        public int max()
        Returns the largest value in this range.

        If this range is empty, this method throws an exception.

      • isSmallerThan

        public boolean isSmallerThan​(int n)
        Returns true if all the integers logically in this Fingerprint.RangeSet is smaller than the given integer. For example, {[1,3)} is smaller than 3, but {[1,3),[100,105)} is not smaller than anything less than 105. Note that {} is smaller than any n.