Package com.vladsch.flexmark.util.misc
Interface CharPredicate
-
- All Superinterfaces:
java.util.function.IntPredicate
public interface CharPredicate extends java.util.function.IntPredicate
Interface for set of characters to use for inclusion exclusion tests Can be used for code points since the argument is int
-
-
Field Summary
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default @NotNull CharPredicate
and(@NotNull CharPredicate other)
Returns a composed predicate that represents a short-circuiting logical AND of this predicate and another.static @NotNull CharPredicate
anyOf(char... chars)
static @NotNull CharPredicate
anyOf(@NotNull java.lang.CharSequence chars)
static int
indexOf(@NotNull java.lang.CharSequence thizz, char c)
static int
indexOf(@NotNull java.lang.CharSequence thizz, char c, int fromIndex, int endIndex)
default @NotNull CharPredicate
negate()
Returns a predicate that represents the logical negation of this predicate.default @NotNull CharPredicate
or(@NotNull CharPredicate other)
Returns a composed predicate that represents a short-circuiting logical OR of this predicate and another.static @NotNull CharPredicate
standardOrAnyOf(char c1)
static @NotNull CharPredicate
standardOrAnyOf(char c1, char c2)
static @NotNull CharPredicate
standardOrAnyOf(char c1, char c2, char c3)
static @NotNull CharPredicate
standardOrAnyOf(char c1, char c2, char c3, char c4)
default boolean
test(char value)
boolean
test(int value)
-
-
-
Field Detail
-
NONE
static final CharPredicate NONE
-
ALL
static final CharPredicate ALL
-
SPACE
static final CharPredicate SPACE
-
TAB
static final CharPredicate TAB
-
EOL
static final CharPredicate EOL
-
ANY_EOL
static final CharPredicate ANY_EOL
-
ANY_EOL_NUL
static final CharPredicate ANY_EOL_NUL
-
BACKSLASH
static final CharPredicate BACKSLASH
-
SLASH
static final CharPredicate SLASH
-
LINE_SEP
static final CharPredicate LINE_SEP
-
HASH
static final CharPredicate HASH
-
SPACE_TAB
static final CharPredicate SPACE_TAB
-
SPACE_TAB_NUL
static final CharPredicate SPACE_TAB_NUL
-
SPACE_TAB_LINE_SEP
static final CharPredicate SPACE_TAB_LINE_SEP
-
SPACE_TAB_NBSP_LINE_SEP
static final CharPredicate SPACE_TAB_NBSP_LINE_SEP
-
SPACE_EOL
static final CharPredicate SPACE_EOL
-
SPACE_ANY_EOL
static final CharPredicate SPACE_ANY_EOL
-
SPACE_TAB_NBSP
static final CharPredicate SPACE_TAB_NBSP
-
SPACE_TAB_EOL
static final CharPredicate SPACE_TAB_EOL
-
SPACE_TAB_NBSP_EOL
static final CharPredicate SPACE_TAB_NBSP_EOL
-
WHITESPACE
static final CharPredicate WHITESPACE
-
WHITESPACE_OR_NUL
static final CharPredicate WHITESPACE_OR_NUL
-
WHITESPACE_NBSP
static final CharPredicate WHITESPACE_NBSP
-
WHITESPACE_NBSP_OR_NUL
static final CharPredicate WHITESPACE_NBSP_OR_NUL
-
BLANKSPACE
static final CharPredicate BLANKSPACE
-
HEXADECIMAL_DIGITS
static final CharPredicate HEXADECIMAL_DIGITS
-
DECIMAL_DIGITS
static final CharPredicate DECIMAL_DIGITS
-
OCTAL_DIGITS
static final CharPredicate OCTAL_DIGITS
-
BINARY_DIGITS
static final CharPredicate BINARY_DIGITS
-
FALSE
@Deprecated static final CharPredicate FALSE
Deprecated.
-
TRUE
@Deprecated static final CharPredicate TRUE
Deprecated.
-
SPACE_TAB_OR_NUL
@Deprecated static final CharPredicate SPACE_TAB_OR_NUL
Deprecated.
-
-
Method Detail
-
test
boolean test(int value)
- Specified by:
test
in interfacejava.util.function.IntPredicate
-
test
default boolean test(char value)
-
and
@NotNull default @NotNull CharPredicate and(@NotNull @NotNull CharPredicate other)
Returns a composed predicate that represents a short-circuiting logical AND of this predicate and another. When evaluating the composed predicate, if this predicate isfalse
, then theother
predicate is not evaluated.Any exceptions thrown during evaluation of either predicate are relayed to the caller; if evaluation of this predicate throws an exception, the
other
predicate will not be evaluated.- Parameters:
other
- a predicate that will be logically-ANDed with this predicate- Returns:
- a composed predicate that represents the short-circuiting logical
AND of this predicate and the
other
predicate - Throws:
java.lang.NullPointerException
- if other is null
-
negate
@NotNull default @NotNull CharPredicate negate()
Returns a predicate that represents the logical negation of this predicate.- Specified by:
negate
in interfacejava.util.function.IntPredicate
- Returns:
- a predicate that represents the logical negation of this predicate
-
or
@NotNull default @NotNull CharPredicate or(@NotNull @NotNull CharPredicate other)
Returns a composed predicate that represents a short-circuiting logical OR of this predicate and another. When evaluating the composed predicate, if this predicate istrue
, then theother
predicate is not evaluated.Any exceptions thrown during evaluation of either predicate are relayed to the caller; if evaluation of this predicate throws an exception, the
other
predicate will not be evaluated.- Parameters:
other
- a predicate that will be logically-ORed with this predicate- Returns:
- a composed predicate that represents the short-circuiting logical
OR of this predicate and the
other
predicate - Throws:
java.lang.NullPointerException
- if other is null
-
standardOrAnyOf
@NotNull static @NotNull CharPredicate standardOrAnyOf(char c1)
-
standardOrAnyOf
@NotNull static @NotNull CharPredicate standardOrAnyOf(char c1, char c2)
-
standardOrAnyOf
@NotNull static @NotNull CharPredicate standardOrAnyOf(char c1, char c2, char c3)
-
standardOrAnyOf
@NotNull static @NotNull CharPredicate standardOrAnyOf(char c1, char c2, char c3, char c4)
-
anyOf
@NotNull static @NotNull CharPredicate anyOf(char... chars)
-
indexOf
static int indexOf(@NotNull @NotNull java.lang.CharSequence thizz, char c)
-
indexOf
static int indexOf(@NotNull @NotNull java.lang.CharSequence thizz, char c, int fromIndex, int endIndex)
-
anyOf
@NotNull static @NotNull CharPredicate anyOf(@NotNull @NotNull java.lang.CharSequence chars)
-
-