Interface Interval<T>

Type Parameters:
T - the type of element in the Interval

public interface Interval<T>
Defines the contract for Interval.
  • Method Details

    • ranging

      static <C extends Comparable<C>> IntervalBuilder<C,C> ranging(Class<C> type)
      Performs ranging.
      Parameters:
      type - the type value
      Returns:
      the result of ranging
    • ranging

      static <C, S> IntervalBuilder<C,S> ranging(Interval.Domain<C,S> order)
      Performs ranging.
      Parameters:
      order - the order value
      Returns:
      the result of ranging
    • ranging

      static <C> IntervalBuilder<C,C> ranging(Comparator<C> comparator)
      Performs ranging.
      Parameters:
      comparator - the comparator value
      Returns:
      the result of ranging
    • empty

      static <C> Interval<C> empty()
      An empty interval.
      Type Parameters:
      C -
      Returns:
    • minimum

      Interval.Boundary<T> minimum()
      Performs minimum.
      Returns:
      the result of minimum
    • maximum

      Interval.Boundary<T> maximum()
      Performs maximum.
      Returns:
      the result of maximum
    • isEmpty

      boolean isEmpty()
      Checks whether is Empty.
      Returns:
      the result of isEmpty
    • contains

      boolean contains(T other)
      Performs contains.
      Parameters:
      other - the other value
      Returns:
      the result of contains
    • intersects

      boolean intersects(Interval<T> other)
      Performs intersects.
      Parameters:
      other - the other value
      Returns:
      the result of intersects
    • contains

      boolean contains(Interval<T> other)
      Performs contains.
      Parameters:
      other - the other value
      Returns:
      the result of contains
    • apply

      default <R> R apply(Function<Interval<T>,R> calculation)
      Performs apply.
      Parameters:
      calculation - the calculation value
      Returns:
      the result of apply