Interface RangeGap<Point_ extends Comparable<Point_>,Difference_ extends Comparable<Difference_>>

Type Parameters:
Point_ - The type for the ranges' start and end points
Difference_ - The type of difference between values in the sequence

public interface RangeGap<Point_ extends Comparable<Point_>,Difference_ extends Comparable<Difference_>>
A RangeGap is a gap between two consecutive ConnectedRanges. For instance, the list [(1,3),(2,4),(3,5),(7,8)] has a grap of length 2 between 5 and 7.
  • Method Details

    • getPreviousRangeEnd

      @NonNull Point_ getPreviousRangeEnd()
      Return the end of the ConnectedRange before this gap. For the gap between 6 and 10, this will return 6.
      Returns:
      the item this gap is directly after
    • getNextRangeStart

      @NonNull Point_ getNextRangeStart()
      Return the start of the ConnectedRange after this gap. For the gap between 6 and 10, this will return 10.
      Returns:
      the item this gap is directly before
    • getLength

      @NonNull Difference_ getLength()
      Return the length of the break, which is the difference between getNextRangeStart() and getPreviousRangeEnd(). For the gap between 6 and 10, this will return 4.
      Returns:
      the length of this break