T - type of the range domain.public final class FilterRange<T extends Comparable<? super T>> extends Base
| Modifier and Type | Field and Description |
|---|---|
protected Bound<T> |
lowerBound |
protected Bound<T> |
upperBound |
| Modifier and Type | Method and Description |
|---|---|
static <T extends Comparable<? super T>> |
atLeast(T lowerEndpoint)
Creates an interval with all values that are greater than or equal to the given endpoint.
|
static <T extends Comparable<? super T>> |
atMost(T upperEndpoint)
Creates an interval with all values that are less than or equal to the given endpoint.
|
boolean |
isBounded()
Determines whether the range has both bounds.
|
boolean |
isEmpty()
Determines whether the range contains no values.
|
boolean |
isLowerBoundExclusive()
Determines whether the lower bound is exclusive bounded
|
boolean |
isLowerBoundInclusive()
Determines whether the lower bound is inclusive bounded
|
boolean |
isUpperBoundExclusive()
Determines whether the upper bound is exclusive bounded
|
boolean |
isUpperBoundInclusive()
Determines whether the upper bound is inclusive bounded
|
Bound<T> |
lowerBound() |
T |
lowerEndpoint()
Gets the endpoint of the lower bound, if defined.
|
static <T extends Comparable<? super T>> |
of(T lowerEndpoint,
T upperEndpoint)
Creates an interval with the given lower and upper endpoints.
|
String |
serialize(Function<T,String> serializer) |
String |
toString() |
Bound<T> |
upperBound() |
T |
upperEndpoint()
Gets the endpoint of the upper bound, if defined.
|
@Nullable protected final Bound<T extends Comparable<? super T>> lowerBound
@Nullable protected final Bound<T extends Comparable<? super T>> upperBound
public static <T extends Comparable<? super T>> FilterRange<T> of(T lowerEndpoint, T upperEndpoint)
T - type of the range domain.lowerEndpoint - lower endpoint, included in the range.upperEndpoint - upper endpoint, included in the range.public static <T extends Comparable<? super T>> FilterRange<T> atMost(T upperEndpoint)
T - type of the range domain.upperEndpoint - upper endpoint, included in the range.public static <T extends Comparable<? super T>> FilterRange<T> atLeast(T lowerEndpoint)
T - type of the range domain.lowerEndpoint - lower endpoint, included in the range.@Nullable public T lowerEndpoint()
@Nullable public T upperEndpoint()
public boolean isUpperBoundExclusive()
public boolean isUpperBoundInclusive()
public boolean isLowerBoundExclusive()
public boolean isLowerBoundInclusive()
public boolean isEmpty()
public boolean isBounded()