Interface EndpointDescriptor

  • All Superinterfaces:
    EndpointType
    All Known Implementing Classes:
    Endpoint, EndpointDescriptors

    public interface EndpointDescriptor
    extends EndpointType
    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 Detail

      • getBoundType

        com.google.common.collect.BoundType getBoundType()
        Specified by:
        getBoundType in interface EndpointType
        Returns:
        Whether the interval end is open or closed.
      • 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

        default <C extends ComparableEndpointAccessor<C,​C> toAcessor()
        Converts this descriptor into an end point accessor for a given point object.
        Type Parameters:
        C - Type of the end points of a Range.
        Returns:
        An end point accessor with the properties of this descriptor.
      • toEndpoint

        default <C extends ComparableEndpoint<C> toEndpoint​(C point)
        Type Parameters:
        C - Type of the end points of a Range.
        Parameters:
        point - An end point object to use.
        Returns:
        An end point with the properties of this descriptor and the given point object.