Interface ParseCallback

Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface ParseCallback
A function that retrieves a chunk of text at a given byte offset and point.
  • Method Details

    • read

      @Nullable String read(@Unsigned int offset, @NonNull Point point)
      Applies this function to the given arguments.
      Parameters:
      offset - the current byte offset
      point - the current point
      Returns:
      A chunk of text or null to indicate the end of the document.
    • apply

      @Deprecated(since="0.26.0", forRemoval=true) default @Nullable String apply(@Unsigned Integer offset, @NonNull Point point)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Use read(int, Point) instead
      Applies this function to the given arguments.
      Parameters:
      offset - the current byte offset
      point - the current point
      Returns:
      A chunk of text or null to indicate the end of the document.