Package org.apache.nemo.common
Class HashRange
- java.lang.Object
-
- org.apache.nemo.common.HashRange
-
- All Implemented Interfaces:
java.io.Serializable
,KeyRange<java.lang.Integer>
public final class HashRange extends java.lang.Object implements KeyRange<java.lang.Integer>
Descriptor for hash range.- See Also:
- Serialized Form
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static HashRange
all()
boolean
equals(java.lang.Object o)
This method should be overridden for KeyRange comparisons.int
hashCode()
This method should be overridden for KeyRange comparisons.boolean
includes(java.lang.Integer i)
boolean
isAll()
static HashRange
of(int rangeStartInclusive, int rangeEndExclusive)
java.lang.Integer
rangeBeginInclusive()
java.lang.Integer
rangeEndExclusive()
java.lang.String
toString()
This method should be overridden for a readable representation of KeyRange.
-
-
-
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()
-
rangeBeginInclusive
public java.lang.Integer rangeBeginInclusive()
- Specified by:
rangeBeginInclusive
in interfaceKeyRange<java.lang.Integer>
- Returns:
- the beginning of this range (inclusive).
-
rangeEndExclusive
public java.lang.Integer rangeEndExclusive()
- Specified by:
rangeEndExclusive
in interfaceKeyRange<java.lang.Integer>
- Returns:
- the end of the range (exclusive)
-
includes
public boolean includes(java.lang.Integer i)
-
toString
public java.lang.String toString()
This method should be overridden for a readable representation of KeyRange. The generic type K should overrideObject
's toString() as well. This method should be overridden for a readable representation of KeyRange. The generic type K should overrideObject
's toString() as well.
-
equals
public boolean equals(java.lang.Object o)
Description copied from interface:KeyRange
This method should be overridden for KeyRange comparisons.
-
-