Enum EndpointTypes

java.lang.Object
java.lang.Enum<EndpointTypes>
de.xima.fc.utils.range.EndpointTypes
All Implemented Interfaces:
EndpointType, Serializable, Comparable<EndpointTypes>

public enum EndpointTypes extends Enum<EndpointTypes> implements EndpointType
An enumeration with implementations of all possible EndpointTypes.
Since:
6.5.0
Author:
XIMA MEDIA GmbH
  • Enum Constant Details

    • LOWER_CLOSED

      public static final EndpointTypes LOWER_CLOSED
      Closed lower end of an interval ([).
    • LOWER_OPEN

      public static final EndpointTypes LOWER_OPEN
      Open lower end of an interval (().
    • UPPER_CLOSED

      public static final EndpointTypes UPPER_CLOSED
      Closed upper end of an interval (]).
    • UPPER_OPEN

      public static final EndpointTypes UPPER_OPEN
      Open upper end of an interval ()).
  • Method Details

    • values

      public static EndpointTypes[] 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

      public static EndpointTypes valueOf(String name)
      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 name
      NullPointerException - if the argument is null
    • getBoundType

      public com.google.common.collect.BoundType getBoundType()
      Specified by:
      getBoundType in interface EndpointType
      Returns:
      Whether the interval end is open or closed.
    • getDirection

      public EndpointDirection getDirection()
      Specified by:
      getDirection in interface EndpointType
      Returns:
      Whether the interval end is a lower or upper end.
    • createComparator

      public static EndpointTypeComparator createComparator(EndpointTypes... order)
      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.