fromSeparatorCharPredicate
Creates a new instance of CharTokenizer using a custom predicate, supplied as method reference or lambda expression. The predicate should return true for all valid token separator characters. This method is provided for convenience to easily use predicates that are negated (they match the separator characters, not the token characters).
This factory is intended to be used with lambdas or method references. E.g., an elegant way to create an instance which behaves exactly as WhitespaceTokenizer is:
Tokenizer tok = CharTokenizer.fromSeparatorCharPredicate(Character::isWhitespace);*
Creates a new instance of CharTokenizer with the supplied attribute factory using a custom predicate, supplied as method reference or lambda expression. The predicate should return true for all valid token separator characters.
This factory is intended to be used with lambdas or method references. E.g., an elegant way to create an instance which behaves exactly as WhitespaceTokenizer is:
Tokenizer tok = CharTokenizer.fromSeparatorCharPredicate(factory, Character::isWhitespace);*