Package com.apple.foundationdb
Class Range
java.lang.Object
com.apple.foundationdb.Range
A simple description of an exact range of keyspace, specified by a begin and end key. As with
all FoundationDB APIs,
begin is inclusive, end exclusive.-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionRange(byte[] begin, byte[] end) Construct a newRangewith an inclusive begin key and an exclusive end key. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturnstrueif the givenObjectis aRangeobject that refers to the same key range within the keyspace.inthashCode()static RangestartsWith(byte[] prefix) Returns aRangethat describes all possible keys that are prefixed with a specified key.toString()Returns a human-readableStringrepresentation of thisRange.
-
Field Details
-
begin
public final byte[] beginThe beginning of the range. This constraint on the range is inclusive. -
end
public final byte[] endThe end of the range. This constraint on the range is exclusive.
-
-
Constructor Details
-
Range
public Range(byte[] begin, byte[] end) Construct a newRangewith an inclusive begin key and an exclusive end key.- Parameters:
begin- the inclusive beginning of the range.end- the exclusive end of the range.
-
-
Method Details
-
startsWith
Returns aRangethat describes all possible keys that are prefixed with a specified key. Use the result of this call as an input toReadTransaction.getRange(Range)to replicate the now-removed callTransaction.getRangeStartsWith(k).- Parameters:
prefix- the key prefixing the range, must not benull- Returns:
- the range of keys starting with
prefix
-
equals
-
hashCode
public int hashCode() -
toString
-