Package org.apache.nemo.common
Interface KeyRange<K extends java.io.Serializable>
-
- Type Parameters:
K
- the type of key to assign for each partition.
- All Superinterfaces:
java.io.Serializable
- All Known Implementing Classes:
HashRange
public interface KeyRange<K extends java.io.Serializable> extends java.io.Serializable
Represents the key range of data partitions within a block.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description 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(K key)
boolean
isAll()
K
rangeBeginInclusive()
K
rangeEndExclusive()
java.lang.String
toString()
This method should be overridden for a readable representation of KeyRange.
-
-
-
Method Detail
-
isAll
boolean isAll()
- Returns:
- whether this instance represents the entire range or not.
-
rangeBeginInclusive
K rangeBeginInclusive()
- Returns:
- the beginning of this range (inclusive).
-
rangeEndExclusive
K rangeEndExclusive()
- Returns:
- the end of this range (exclusive).
-
includes
boolean includes(K key)
- Parameters:
key
- the value to check- Returns:
true
if this key range includes the specified value,false
otherwise
-
toString
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.- Overrides:
toString
in classjava.lang.Object
-
equals
boolean equals(java.lang.Object o)
This method should be overridden for KeyRange comparisons.- Overrides:
equals
in classjava.lang.Object
-
hashCode
int hashCode()
This method should be overridden for KeyRange comparisons.- Overrides:
hashCode
in classjava.lang.Object
-
-