null. Unlike Range, this allows the use of an arbitrary comparator. This is designed for use in the
implementation of subcollections of sorted collection types.
Whenever possible, use Range instead, which is better supported.
| Modifier and Type | Field and Description |
|---|---|
| private final Comparator | |
| private final boolean | |
| private final boolean | |
| private final BoundType | |
| private final T | |
| private transient GeneralRange | |
| private final BoundType | |
| private final T |
| Access | Constructor and Description |
|---|---|
| private | GeneralRange(Comparator<? super T> comparator, boolean hasLowerBound, T lowerEndpoint, BoundType lowerBoundType, boolean hasUpperBound, T upperEndpoint, BoundType upperBoundType)
|
| Modifier and Type | Method and Description |
|---|---|
| pack-priv static <T extends @Nullable Object> GeneralRange | |
| pack-priv Comparator | |
| pack-priv boolean | |
| pack-priv static <T extends @Nullable Object> GeneralRange | downTo(Comparator<? super T> comparator, T endpoint, BoundType boundType)
Returns everything above the endpoint relative to the specified comparator, with the specified endpoint behavior. |
| public boolean | equals(Object
the reference object with which to compare. obj)Overrides java. |
| pack-priv static <T extends Comparable | |
| pack-priv BoundType | |
| pack-priv T | |
| pack-priv BoundType | |
| pack-priv T | |
| public int | |
| pack-priv boolean | |
| pack-priv boolean | |
| pack-priv GeneralRange | intersect(GeneralRange<T> other)
Returns the intersection of the two ranges, or an empty range if their intersection is empty. |
| pack-priv boolean | |
| pack-priv static <T extends @Nullable Object> GeneralRange | range(Comparator<? super T> comparator, T lower, BoundType lowerType, T upper, BoundType upperType)
Returns everything between the endpoints relative to the specified comparator, with the specified endpoint behavior. |
| pack-priv GeneralRange | |
| pack-priv boolean | |
| pack-priv boolean | |
| public String | |
| pack-priv static <T extends @Nullable Object> GeneralRange | upTo(Comparator<? super T> comparator, T endpoint, BoundType boundType)
Returns everything below the endpoint relative to the specified comparator, with the specified endpoint behavior. |
| comparator | back to summary |
|---|---|
| private final Comparator<? super T> comparator | |
| hasLowerBound | back to summary |
|---|---|
| private final boolean hasLowerBound | |
| hasUpperBound | back to summary |
|---|---|
| private final boolean hasUpperBound | |
| lowerBoundType | back to summary |
|---|---|
| private final BoundType lowerBoundType | |
| lowerEndpoint | back to summary |
|---|---|
| private final T lowerEndpoint
| |
| reverse | back to summary |
|---|---|
| private transient GeneralRange<T> reverse
| |
| upperBoundType | back to summary |
|---|---|
| private final BoundType upperBoundType | |
| upperEndpoint | back to summary |
|---|---|
| private final T upperEndpoint
| |
| GeneralRange | back to summary |
|---|---|
| private GeneralRange(Comparator<? super T> comparator, boolean hasLowerBound, T lowerEndpoint, BoundType lowerBoundType, boolean hasUpperBound, T upperEndpoint, BoundType upperBoundType) | |
| all | back to summary |
|---|---|
| pack-priv static <T extends @Nullable Object> GeneralRange Returns the whole range relative to the specified comparator. | |
| comparator | back to summary |
|---|---|
| pack-priv Comparator | |
| contains | back to summary |
|---|---|
| pack-priv boolean contains(T t) | |
| downTo | back to summary |
|---|---|
| pack-priv static <T extends @Nullable Object> GeneralRange Returns everything above the endpoint relative to the specified comparator, with the specified endpoint behavior. | |
| equals | back to summary |
|---|---|
| public boolean equals(Object obj) Overrides java. Doc from java. Indicates whether some other object is "equal to" this one.
The
An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes. | |
| from | back to summary |
|---|---|
| pack-priv static <T extends Comparable Converts a Range to a GeneralRange.
| |
| getLowerBoundType | back to summary |
|---|---|
| pack-priv BoundType getLowerBoundType() | |
| getLowerEndpoint | back to summary |
|---|---|
pack-priv T getLowerEndpoint()
| |
| getUpperBoundType | back to summary |
|---|---|
| pack-priv BoundType getUpperBoundType() | |
| getUpperEndpoint | back to summary |
|---|---|
pack-priv T getUpperEndpoint()
| |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Doc from java. Returns a hash code value for this object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
| |
| hasLowerBound | back to summary |
|---|---|
| pack-priv boolean hasLowerBound() | |
| hasUpperBound | back to summary |
|---|---|
| pack-priv boolean hasUpperBound() | |
| intersect | back to summary |
|---|---|
| pack-priv GeneralRange Returns the intersection of the two ranges, or an empty range if their intersection is empty.
| |
| isEmpty | back to summary |
|---|---|
| pack-priv boolean isEmpty() | |
| range | back to summary |
|---|---|
| pack-priv static <T extends @Nullable Object> GeneralRange Returns everything between the endpoints relative to the specified comparator, with the specified endpoint behavior. | |
| reverse | back to summary |
|---|---|
| pack-priv GeneralRange Returns the same range relative to the reversed comparator. | |
| tooHigh | back to summary |
|---|---|
| pack-priv boolean tooHigh(T t) | |
| tooLow | back to summary |
|---|---|
| pack-priv boolean tooLow(T t) | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object. | |
| upTo | back to summary |
|---|---|
| pack-priv static <T extends @Nullable Object> GeneralRange Returns everything below the endpoint relative to the specified comparator, with the specified endpoint behavior. | |