Package io.lettuce.core
Class Range.Boundary<T>
- java.lang.Object
-
- io.lettuce.core.Range.Boundary<T>
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
static <T> Range.Boundary<T>
excluding(T value)
Create aRange.Boundary
based on thevalue
that excludes the value when comparing ranges.T
getValue()
int
hashCode()
static <T> Range.Boundary<T>
including(T value)
Create aRange.Boundary
based on thevalue
that includes the value when comparing ranges.boolean
isBounded()
boolean
isIncluding()
boolean
isUnbounded()
String
toString()
static <T> Range.Boundary<T>
unbounded()
Creates an unbounded (infinite) boundary that marks the beginning/end of the range.
-
-
-
Method Detail
-
unbounded
public static <T> Range.Boundary<T> unbounded()
Creates an unbounded (infinite) boundary that marks the beginning/end of the range.- Type Parameters:
T
- inferred type.- Returns:
- the unbounded boundary.
-
including
public static <T> Range.Boundary<T> including(T value)
Create aRange.Boundary
based on thevalue
that includes the value when comparing ranges. Greater or equals, less or equals. but not Greater or equal, less or equal tovalue
.- Type Parameters:
T
- value type.- Parameters:
value
- must not benull
.- Returns:
- the
Range.Boundary
.
-
excluding
public static <T> Range.Boundary<T> excluding(T value)
Create aRange.Boundary
based on thevalue
that excludes the value when comparing ranges. Greater or less tovalue
but not greater or equal, less or equal.- Type Parameters:
T
- value type.- Parameters:
value
- must not benull
.- Returns:
- the
Range.Boundary
.
-
getValue
public T getValue()
- Returns:
- the value
-
isIncluding
public boolean isIncluding()
- Returns:
true
if the boundary includes the value.
-
isUnbounded
public boolean isUnbounded()
- Returns:
true
if the bound is unbounded.- Since:
- 6.0
-
isBounded
public boolean isBounded()
- Returns:
true
if the bound is unbounded.- Since:
- 6.0
-
-