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:
LookaheadMatcher,Function
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleantoSkip(int cur)Determines whether the current character is to be skipped.
-
-
-
Method Detail
-
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,
-1will 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:
trueto continue skipping ahead,falseto stop skipping
-
-