Package org.springframework.data.domain
Class Range.Bound<T extends Comparable<T>>
java.lang.Object
org.springframework.data.domain.Range.Bound<T>
- Enclosing class:
- Range<T extends Comparable<T>>
Value object representing a boundary. A boundary can either be
unbounded
,
including its value
or its value
.- Since:
- 2.0
- Author:
- Mark Paluch
-
Method Summary
Modifier and TypeMethodDescriptionboolean
static Range.Bound<Double>
exclusive
(double value) Creates a boundary excludingvalue
.static Range.Bound<Float>
exclusive
(float value) Creates a boundary excludingvalue
.static Range.Bound<Integer>
exclusive
(int value) Creates a boundary excludingvalue
.static Range.Bound<Long>
exclusive
(long value) Creates a boundary excludingvalue
.static <T extends Comparable<T>>
Range.Bound<T>exclusive
(T value) Creates a boundary excludingvalue
.getValue()
int
hashCode()
static Range.Bound<Double>
inclusive
(double value) Creates a boundary includingvalue
.static Range.Bound<Float>
inclusive
(float value) Creates a boundary includingvalue
.static Range.Bound<Integer>
inclusive
(int value) Creates a boundary includingvalue
.static Range.Bound<Long>
inclusive
(long value) Creates a boundary includingvalue
.static <T extends Comparable<T>>
Range.Bound<T>inclusive
(T value) Creates a boundary includingvalue
.boolean
Returns whether this boundary is bounded.boolean
toString()
static <T extends Comparable<T>>
Range.Bound<T>Creates an unboundedRange.Bound
.
-
Method Details
-
unbounded
Creates an unboundedRange.Bound
. -
isBounded
public boolean isBounded()Returns whether this boundary is bounded.- Returns:
-
inclusive
Creates a boundary includingvalue
.- Parameters:
value
- must not be null.- Returns:
-
inclusive
Creates a boundary includingvalue
.- Parameters:
value
- must not be null.- Returns:
-
inclusive
Creates a boundary includingvalue
.- Parameters:
value
- must not be null.- Returns:
-
inclusive
Creates a boundary includingvalue
.- Parameters:
value
- must not be null.- Returns:
-
inclusive
Creates a boundary includingvalue
.- Parameters:
value
- must not be null.- Returns:
-
exclusive
Creates a boundary excludingvalue
.- Parameters:
value
- must not be null.- Returns:
-
exclusive
Creates a boundary excludingvalue
.- Parameters:
value
- must not be null.- Returns:
-
exclusive
Creates a boundary excludingvalue
.- Parameters:
value
- must not be null.- Returns:
-
exclusive
Creates a boundary excludingvalue
.- Parameters:
value
- must not be null.- Returns:
-
exclusive
Creates a boundary excludingvalue
.- Parameters:
value
- must not be null.- Returns:
-
toString
-
getValue
-
isInclusive
public boolean isInclusive() -
equals
-
hashCode
public int hashCode()
-