Package de.xima.fc.utils.range
Interface EndpointDescriptor
- All Superinterfaces:
EndpointType
- All Known Implementing Classes:
Endpoint
,EndpointDescriptors
Interface for a handler that describes the properties of an end point of
Range
. An endpoint can be either a
lower or upper end point, it can be closed or open, and it can have a bound or not. Unbounded end points describe
negative or positive infinity and are used for open or half-open ranges such as (-Infinity, +Infinity)
.- Since:
- 6.5.0
- Author:
- XIMA MEDIA GmbH
-
Method Summary
Modifier and TypeMethodDescriptioncom.google.common.collect.BoundType
boolean
hasBound()
default boolean
default boolean
default <C extends Comparable>
EndpointAccessor<C,C> Converts this descriptor into an end point accessor for a given point object.default <C extends Comparable>
Endpoint<C>toEndpoint
(C point)
-
Method Details
-
getBoundType
com.google.common.collect.BoundType getBoundType()- Specified by:
getBoundType
in interfaceEndpointType
- Returns:
- Whether the interval end is open or closed.
-
getDirection
EndpointDirection getDirection()- Specified by:
getDirection
in interfaceEndpointType
- Returns:
- Whether the interval end is a lower or upper end.
-
hasBound
boolean hasBound()- Returns:
- Whether this end point has a bound with an associated point object, or is unbounded (negative or positive infinity).
-
isLowerPoint
default boolean isLowerPoint()- Returns:
- Whether the end point is a lower end point.
-
isUpperPoint
default boolean isUpperPoint()- Returns:
- Whether the end point is an upper end point.
-
toAcessor
Converts this descriptor into an end point accessor for a given point object.- Type Parameters:
C
- Type of the end points of aRange
.- Returns:
- An end point accessor with the properties of this descriptor.
-
toEndpoint
- Type Parameters:
C
- Type of the end points of aRange
.- Parameters:
point
- An end point object to use.- Returns:
- An end point with the properties of this descriptor and the given point object.
-