TextFieldInputCharSequenceFilterpublic class FilterAcceptRegex extends java.lang.Object implements TextFieldInputCharSequenceFilter
| Constructor | Description |
|---|---|
FilterAcceptRegex(java.lang.String expression) |
Create a new instance and set the regular expression used for the test.
|
FilterAcceptRegex(java.lang.String expression,
int flags) |
Create a new instance and set the regular expression that needs to be checked.
|
FilterAcceptRegex(java.util.regex.Pattern expression) |
Create a new instance of this class and set the pattern that is used for the test.
|
| Modifier and Type | Method | Description |
|---|---|---|
boolean |
acceptInput(int index,
java.lang.CharSequence newChars) |
Check if the input of a new set of characters is acceptable.
|
public FilterAcceptRegex(@Nonnull
java.util.regex.Pattern expression)
expression - the used patternpublic FilterAcceptRegex(@Nonnull
java.lang.String expression)
expression - the regular expressionpublic FilterAcceptRegex(@Nonnull
java.lang.String expression,
int flags)
expression - the regular expressionflags - Match flags, a bit mask that may include Pattern.CASE_INSENSITIVE,
Pattern.MULTILINE,
Pattern.DOTALL, Pattern.UNICODE_CASE, Pattern.CANON_EQ,
Pattern.UNIX_LINES, Pattern.LITERAL and Pattern.COMMENTSpublic boolean acceptInput(int index,
@Nonnull
java.lang.CharSequence newChars)
TextFieldInputCharSequenceFilteracceptInput in interface TextFieldInputCharSequenceFilterindex - the position within the text where the character is addednewChars - the characters that is now about to be added to the texttrue in case adding the character is allowedCopyright © 2018. All rights reserved.