Interface Interval

    • Method Detail

      • start

        int start()
        Returns the starting point of this.
      • end

        int end()
        Returns the ending point of this.

        The interval does not include this point.

      • length

        default int length()
        Returns the length of this.
      • isAdjacent

        default boolean isAdjacent​(Interval other)
        Returns if this interval is adjacent to the specified interval.

        Two intervals are adjacent if either one ends where the other starts.

        Parameters:
        other - - the interval to compare this one to
        Returns:
        if this interval is adjacent to the specified interval.
      • overlaps

        default boolean overlaps​(Interval o)
      • overlaps

        default boolean overlaps​(int start,
                                 int end)
      • compareTo

        default int compareTo​(int s,
                              int e)