Class Range<T,R extends Range<T,R>>
java.lang.Object
com.google.cloud.bigtable.data.v2.models.Range<T,R>
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
Filters.QualifierRangeFilter
,Filters.TimestampRangeFilter
,Filters.ValueRangeFilter
,Range.ByteStringRange
,Range.TimestampRange
@InternalExtensionOnly
public abstract class Range<T,R extends Range<T,R>>
extends Object
implements Serializable
Range API.
This base class represents the API for all ranges in the Cloud Bigtable client. Please note this mutable type. It's intended to support fluent DSLs.For example:
// A Range that encloses all strings
ByteStringRange.unbounded();
// Range that includes all strings including "begin" up until "end"
ByteStringRange.unbounded().of("start", "end");
// Create a Bytestring range with an unbounded start and the inclusive end "end"
ByteStringRange.unbounded().endClosed("end");
// Ranges are mutable, so take care to clone them to get a new instance
ByteStringRange r1 = ByteStringRange.of("a", "z");
ByteStringRange r2 = r1.clone().endUnbounded();
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
static final class
Concrete Range for ByteStringsstatic final class
Concrete Range for timestamps -
Method Summary
Modifier and TypeMethodDescriptionCreates a newRange
with the specified inclusive end and the current start.Creates a newRange
with the specified exclusive end and the current start.Creates a newRange
with the current start and an unbounded end.getEnd()
Gets the current end value.Gets the current endRange.BoundType
.getStart()
Gets the current start value.Gets the current startRange.BoundType
.Creates a newRange
with the specified inclusive start and the specified exclusive end.startClosed
(T start) Creates a newRange
with the specified inclusive start and the current end.Creates a newRange
with the specified exclusive start and the current end.Creates a newRange
with an unbounded start and the current end.
-
Method Details
-
of
Creates a newRange
with the specified inclusive start and the specified exclusive end. -
startUnbounded
Creates a newRange
with an unbounded start and the current end. -
startOpen
Creates a newRange
with the specified exclusive start and the current end. -
startClosed
Creates a newRange
with the specified inclusive start and the current end. -
endUnbounded
Creates a newRange
with the current start and an unbounded end. -
endOpen
Creates a newRange
with the specified exclusive end and the current start. -
endClosed
Creates a newRange
with the specified inclusive end and the current start. -
getStartBound
Gets the current startRange.BoundType
. -
getStart
Gets the current start value.- Throws:
IllegalStateException
- If the currentgetStartBound()
isRange.BoundType.UNBOUNDED
.
-
getEndBound
Gets the current endRange.BoundType
. -
getEnd
Gets the current end value.- Throws:
IllegalStateException
- If the currentgetEndBound()
isRange.BoundType.UNBOUNDED
.
-