Interface ContextlessMatcher

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 ContextlessMatcher

Context-less matcher callback for Parser.skip(ContextlessMatcher).

This is a functional interface for method references or lambdas. It contains one method toSkip(int) that determines whether to abort or continue skipping, based on the characters in the input data.

This interface is identical to Function<int, boolean> except for the name of its functional method.

Author:
mirabilos (t.glaser@tarent.de)
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    toSkip(int cur)
    Determines whether the current character is to be skipped.
  • Method Details

    • toSkip

      boolean toSkip(int cur)

      Determines whether the current character is to be skipped.

      Skipping ahead is determined based on the codepoints in the file, that is, the input fully decoded to UCS (ISO 10646) codepoints, not just bytes or Java™-internal UTF-16 characters. If the end of input is reached, -1 will be passed; otherwise, the 21-bit UCS codepoint of the respective wide (possibly multibyte, in the input) character.

      Parameters:
      cur - the codepoint of the current character
      Returns:
      true to continue skipping ahead, false to stop skipping