Interface RangesBuffer

All Superinterfaces:
CharacterSet, SortedListOfRanges
All Known Implementing Classes:
IntRangesBuffer

public interface RangesBuffer extends SortedListOfRanges
Extensions of SortedListOfRanges specific to mutable implementations.
  • Method Details

    • clear

      void clear()
      Removes all ranges from this list.
    • appendRange

      void appendRange(int lo, int hi)
      Appends [lo hi] to this list. The given range must be right of and non-adjacent to the last range in this list.
    • insertRange

      void insertRange(int index, int lo, int hi)
      Insert [lo hi] at the given index. The given range must be right of and non-adjacent to the range at index - 1, and left of and non-adjacent to the range at index.
    • replaceRanges

      void replaceRanges(int fromIndex, int toIndex, int lo, int hi)
      Replace all ranges from fromIndex (inclusive) to toIndex (exclusive) with the single range [lo hi]. The given range must be right of and non-adjacent to the range at fromIndex - 1, and left of and non-adjacent to the range at toIndex.
    • create

      <T extends RangesBuffer> T create()
      Create a new instance of this class.
    • addRange

      default void addRange(int lo, int hi)
      Add [lo hi] to this list. The list is altered such that all values of the given range are included and SortedListOfRanges.rangesAreSortedNonAdjacentAndDisjoint() holds after the operation.