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:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classRange.BoundTypestatic classRange.ByteStringRangeConcrete Range for ByteStringsstatic classRange.TimestampRangeConcrete Range for timestamps
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RendClosed(T end)Creates a newRangewith the specified inclusive end and the current start.RendOpen(T end)Creates a newRangewith the specified exclusive end and the current start.RendUnbounded()Creates a newRangewith the current start and an unbounded end.TgetEnd()Gets the current end value.Range.BoundTypegetEndBound()Gets the current endRange.BoundType.TgetStart()Gets the current start value.Range.BoundTypegetStartBound()Gets the current startRange.BoundType.Rof(T startClosed, T endOpen)Creates a newRangewith the specified inclusive start and the specified exclusive end.RstartClosed(T start)Creates a newRangewith the specified inclusive start and the current end.RstartOpen(T start)Creates a newRangewith the specified exclusive start and the current end.RstartUnbounded()Creates a newRangewith an unbounded start and the current end.
-
-
-
Method Detail
-
of
public R of(@Nonnull T startClosed, @Nonnull T endOpen)
Creates a newRangewith the specified inclusive start and the specified exclusive end.
-
startUnbounded
public R startUnbounded()
Creates a newRangewith an unbounded start and the current end.
-
startOpen
public R startOpen(@Nonnull T start)
Creates a newRangewith the specified exclusive start and the current end.
-
startClosed
public R startClosed(@Nonnull T start)
Creates a newRangewith the specified inclusive start and the current end.
-
endUnbounded
public R endUnbounded()
Creates a newRangewith the current start and an unbounded end.
-
endOpen
public R endOpen(@Nonnull T end)
Creates a newRangewith the specified exclusive end and the current start.
-
endClosed
public R endClosed(@Nonnull T end)
Creates a newRangewith the specified inclusive end and the current start.
-
getStartBound
public Range.BoundType getStartBound()
Gets the current startRange.BoundType.
-
getStart
public T getStart()
Gets the current start value.- Throws:
IllegalStateException- If the currentgetStartBound()isRange.BoundType.UNBOUNDED.
-
getEndBound
public Range.BoundType getEndBound()
Gets the current endRange.BoundType.
-
getEnd
public T getEnd()
Gets the current end value.- Throws:
IllegalStateException- If the currentgetEndBound()isRange.BoundType.UNBOUNDED.
-
-