public class Range
extends java.lang.Object
begin is inclusive, end exclusive.| Modifier and Type | Field and Description |
|---|---|
byte[] |
begin
The beginning of the range.
|
byte[] |
end
The end of the range.
|
| Constructor and Description |
|---|
Range(byte[] begin,
byte[] end)
Construct a new
Range with an inclusive begin key and an exclusive
end key. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object o)
Returns
true if the given Object is a Range
object that refers to the same key range within the keyspace. |
int |
hashCode()
|
static Range |
startsWith(byte[] prefix)
Returns a
Range that describes all possible keys that are prefixed with a
specified key. |
java.lang.String |
toString()
Returns a human-readable
String representation of this Range. |
public final byte[] begin
public final byte[] end
public Range(byte[] begin,
byte[] end)
Range with an inclusive begin key and an exclusive
end key.begin - the inclusive beginning of the range.end - the exclusive end of the range.public static Range startsWith(byte[] prefix)
Range that describes all possible keys that are prefixed with a
specified key. Use the result of this call as an input to
ReadTransaction.getRange(Range) to replicate the now-removed call
Transaction.getRangeStartsWith(k).prefix - the key prefixing the range, must not be nullprefixpublic boolean equals(java.lang.Object o)
true if the given Object is a Range
object that refers to the same key range within the keyspace.
This will be true if the given range has the same begin
and end key. This will return false if the given
Object is not a Range instance.equals in class java.lang.Objecto - the Object to check for equalityObject matches this Rangepublic int hashCode()