Package de.xima.fc.utils.range
Enum EndpointTypes
- All Implemented Interfaces:
EndpointType
,Serializable
,Comparable<EndpointTypes>
An enumeration with implementations of all possible
EndpointType
s.- Since:
- 6.5.0
- Author:
- XIMA MEDIA GmbH
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionClosed lower end of an interval ([
).Open lower end of an interval ((
).Closed upper end of an interval (]
).Open upper end of an interval ()
). -
Method Summary
Modifier and TypeMethodDescriptionstatic EndpointTypeComparator
createComparator
(EndpointTypes... order) Creates a new end point comparator that compares end points in the given order.com.google.common.collect.BoundType
static EndpointTypes
Returns the enum constant of this type with the specified name.static EndpointTypes[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
LOWER_CLOSED
Closed lower end of an interval ([
). -
LOWER_OPEN
Open lower end of an interval ((
). -
UPPER_CLOSED
Closed upper end of an interval (]
). -
UPPER_OPEN
Open upper end of an interval ()
).
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
getBoundType
public com.google.common.collect.BoundType getBoundType()- Specified by:
getBoundType
in interfaceEndpointType
- Returns:
- Whether the interval end is open or closed.
-
getDirection
- Specified by:
getDirection
in interfaceEndpointType
- Returns:
- Whether the interval end is a lower or upper end.
-
createComparator
Creates a new end point comparator that compares end points in the given order.- Parameters:
order
- Target order of the end points.- Returns:
- A comparator for end points that compares in the given order.
-