Package com.apple.foundationdb
Class Range
- java.lang.Object
-
- com.apple.foundationdb.Range
-
public class Range extends java.lang.ObjectA simple description of an exact range of keyspace, specified by a begin and end key. As with all FoundationDB APIs,beginis inclusive,endexclusive.
-
-
Constructor Summary
Constructors Constructor Description Range(byte[] begin, byte[] end)Construct a newRangewith an inclusive begin key and an exclusive end key.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object o)Returnstrueif 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.java.lang.StringtoString()Returns a human-readableStringrepresentation of thisRange.
-
-
-
Method Detail
-
startsWith
public static Range startsWith(byte[] prefix)
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
public boolean equals(java.lang.Object o)
Returnstrueif the givenObjectis aRangeobject that refers to the same key range within the keyspace. This will be true if the given range has the samebeginandendkey. This will returnfalseif the givenObjectis not aRangeinstance.- Overrides:
equalsin classjava.lang.Object- Parameters:
o- theObjectto check for equality- Returns:
- whether the given
Objectmatches thisRange
-
hashCode
public int hashCode()
-
-