public enum EndpointAccessorsIdentity extends Enum<EndpointAccessorsIdentity> implements EndpointAccessor<Comparable,Comparable>
EndpointAccessor
, for Range.lowerEndpoint()
s or
Range.upperEndpoint()
. You should use an EndpointDescriptor
instead if possible. For example:
final Range<Integer> range = RangeUtils.createRange( // 1, // EndpointAccessorsIdentity.lowerEndpointClosed(), // null, // EndpointAccessorsIdentity.positiveInfinity() // );
Enum Constant and Description |
---|
LOWER_ENDPOINT_CLOSED
Accessor for the closed, lower end point of a range.
|
LOWER_ENDPOINT_OPEN
Accessor for the open, lower end point of a range.
|
NEGATIVE_INFINITY
Accessor for the negative infinity (lower) end point of a half-open range.
|
POSITIVE_INFINITY
Accessor for the positive infinity (upper) end point of a half-open range.
|
UPPER_ENDPOINT_CLOSED
Accessor for the closed, upper end point of a range.
|
UPPER_ENDPOINT_OPEN
Accessor for the open, upper end point of a range.
|
Modifier and Type | Method and Description |
---|---|
com.google.common.collect.BoundType |
getBoundType(Comparable item) |
EndpointDirection |
getDirection(Comparable item) |
Comparable |
getPoint(Comparable item) |
boolean |
hasBound(Comparable item) |
static <C extends Comparable> |
lowerEndpointClosed() |
static <C extends Comparable> |
lowerEndpointOpen() |
static <T,C extends Comparable> |
negativeInfinity() |
static <T,C extends Comparable> |
positiveInfinity() |
static <C extends Comparable> |
upperEndpointClosed() |
static <C extends Comparable> |
upperEndpointOpen() |
static EndpointAccessorsIdentity |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static EndpointAccessorsIdentity[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
compareByEndpoint, compareByEndpoint, createByEndpointComparator, createByEndpointComparator, mapping, toDescriptor, toEndpoint
public static final EndpointAccessorsIdentity LOWER_ENDPOINT_CLOSED
public static final EndpointAccessorsIdentity LOWER_ENDPOINT_OPEN
public static final EndpointAccessorsIdentity NEGATIVE_INFINITY
public static final EndpointAccessorsIdentity POSITIVE_INFINITY
public static final EndpointAccessorsIdentity UPPER_ENDPOINT_CLOSED
public static final EndpointAccessorsIdentity UPPER_ENDPOINT_OPEN
public static EndpointAccessorsIdentity[] values()
for (EndpointAccessorsIdentity c : EndpointAccessorsIdentity.values()) System.out.println(c);
public static EndpointAccessorsIdentity valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic com.google.common.collect.BoundType getBoundType(Comparable item)
getBoundType
in interface EndpointAccessor<Comparable,Comparable>
item
- An item with an endpoint to check.public EndpointDirection getDirection(Comparable item)
getDirection
in interface EndpointAccessor<Comparable,Comparable>
item
- An item with an endpoint to check.public Comparable getPoint(Comparable item)
getPoint
in interface EndpointAccessor<Comparable,Comparable>
item
- An item with an endpoint to process.public boolean hasBound(Comparable item)
hasBound
in interface EndpointAccessor<Comparable,Comparable>
item
- An item with an endpoint to check.public static <C extends Comparable> EndpointAccessor<C,C> lowerEndpointClosed()
C
- Type of the end point of the Range
.LOWER_ENDPOINT_CLOSED
cast
to the correct type.public static <C extends Comparable> EndpointAccessor<C,C> lowerEndpointOpen()
C
- Type of the end point of the Range
.LOWER_ENDPOINT_OPEN
cast to
the correct type.public static <T,C extends Comparable> EndpointAccessor<T,C> negativeInfinity()
T
- Type of the object holding the endpoint. Can be anything as the end point is never actually accessed.C
- Type of the end point of the Range
.NEGATIVE_INFINITY
cast to the correct type.public static <T,C extends Comparable> EndpointAccessor<T,C> positiveInfinity()
T
- Type of the object holding the endpoint. Can be anything as the end point is never actually accessed.C
- Type of the end point of the Range
.POSITIVE_INFINITY
cast to the correct type.public static <C extends Comparable> EndpointAccessor<C,C> upperEndpointClosed()
C
- Type of the end point of the Range
.UPPER_ENDPOINT_CLOSED
cast
to the correct type.public static <C extends Comparable> EndpointAccessor<C,C> upperEndpointOpen()
C
- Type of the end point of the Range
.UPPER_ENDPOINT_OPEN
cast to
the correct type.Copyright © 2020 XIMA MEDIA GmbH. All rights reserved.