Package org.springframework.data.domain
Class Range.Bound<T>
java.lang.Object
org.springframework.data.domain.Range.Bound<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 TypeMethodDescriptionbooleanstatic 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> Range.Bound<T>exclusive(T value) Creates a boundary excludingvalue.getValue()inthashCode()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> Range.Bound<T>inclusive(T value) Creates a boundary includingvalue.booleanReturns whether this boundary is bounded.boolean<R> Range.Bound<R>Apply a mappingFunctionto the boundary value.toString()static <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.
-
inclusive
Creates a boundary includingvalue.- Parameters:
value- must not be null.
-
inclusive
Creates a boundary includingvalue.- Parameters:
value- must not be null.
-
inclusive
Creates a boundary includingvalue.- Parameters:
value- must not be null.
-
inclusive
Creates a boundary includingvalue.- Parameters:
value- must not be null.
-
exclusive
Creates a boundary excludingvalue.- Parameters:
value- must not be null.
-
exclusive
Creates a boundary excludingvalue.- Parameters:
value- must not be null.
-
exclusive
Creates a boundary excludingvalue.- Parameters:
value- must not be null.
-
exclusive
Creates a boundary excludingvalue.- Parameters:
value- must not be null.
-
exclusive
Creates a boundary excludingvalue.- Parameters:
value- must not be null.
-
getValue
-
isInclusive
public boolean isInclusive() -
map
Apply a mappingFunctionto the boundary value.- Type Parameters:
R-- Parameters:
mapper- must not be null. If the mapper returns null, then the boundary value corresponds withunbounded().- Returns:
- a new
Range.Boundafter applying the value to the mapper. - Since:
- 3.0
-
equals
-
hashCode
public int hashCode() -
toString
-