Class HashRange

    • Method Detail

      • all

        public static HashRange all()
        Returns:
        Gets a hash range descriptor representing the whole data from a partition.
      • of

        public static HashRange of​(int rangeStartInclusive,
                                   int rangeEndExclusive)
        Parameters:
        rangeStartInclusive - the start of the range (inclusive)
        rangeEndExclusive - the end of the range (exclusive)
        Returns:
        A hash range descriptor representing [rangeBeginInclusive, rangeEndExclusive)
      • isAll

        public boolean isAll()
        Specified by:
        isAll in interface KeyRange<Integer>
        Returns:
        whether this hash range descriptor represents the whole data or not.
      • includes

        public boolean includes​(Integer i)
        Specified by:
        includes in interface KeyRange<Integer>
        Parameters:
        i - the value to test
        Returns:
        true if this hash range includes the specified value, false otherwise
      • toString

        public String toString()
        This method should be overridden for a readable representation of KeyRange. The generic type K should override Object's toString() as well. This method should be overridden for a readable representation of KeyRange. The generic type K should override Object's toString() as well.
        Specified by:
        toString in interface KeyRange<Integer>
        Overrides:
        toString in class Object
      • equals

        public boolean equals​(Object o)
        Description copied from interface: KeyRange
        This method should be overridden for KeyRange comparisons.
        Specified by:
        equals in interface KeyRange<Integer>
        Overrides:
        equals in class Object
      • hashCode

        public int hashCode()
        Description copied from interface: KeyRange
        This method should be overridden for KeyRange comparisons.
        Specified by:
        hashCode in interface KeyRange<Integer>
        Overrides:
        hashCode in class Object
        Returns:
        the hash value.