T
- type of the endpoint contained in the bound.public final class Bound<T extends Comparable<? super T>> extends Base
Modifier and Type | Method and Description |
---|---|
T |
endpoint() |
static <T extends Comparable<? super T>> |
exclusive(T endpoint)
Creates a bound with the given endpoint, excluded from the range.
|
static <T extends Comparable<? super T>> |
inclusive(T endpoint)
Creates a bound with the given endpoint, included from the range.
|
boolean |
isExclusive()
Determines whether the endpoint is excluded from the range or included.
|
boolean |
isInclusive()
Determines whether the endpoint is included from the range or excluded.
|
Bound<T> |
withEndpoint(T endpoint)
Generates a bound with the same characteristics of the current bound but with the given endpoint instead.
|
public T endpoint()
public boolean isExclusive()
public boolean isInclusive()
public Bound<T> withEndpoint(T endpoint)
endpoint
- for the new bound.public static <T extends Comparable<? super T>> Bound<T> exclusive(T endpoint)
T
- type of the endpoint.endpoint
- the endpoint value of the given type T.public static <T extends Comparable<? super T>> Bound<T> inclusive(T endpoint)
T
- type of the endpoint.endpoint
- the endpoint value of the given type T.