public class ListCharFilter extends Object implements CharFilter
CharFilter interface that filters characters
according to a given blacklist or whitelist.| Modifier and Type | Field and Description |
|---|---|
private boolean |
blacklist |
private char[] |
chars |
ACCEPT_ALL_FILTER, ASCII_LETTER_FILTER, ASCII_LOWER_CASE_LETTER_FILTER, ASCII_UPPER_CASE_LETTER_FILTER, FILE_SEPARATOR_FILTER, IDENTIFIER_FILTER, LATIN_DIGIT_FILTER, LATIN_DIGIT_OR_LETTER_FILTER, WHITESPACE_FILTER| Constructor and Description |
|---|
ListCharFilter(boolean accept,
char... charArray)
The constructor.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
accept(char c)
This method determines if the given character
c should be accepted. |
private boolean blacklist
accept(char)private final char[] chars
accept(char)public ListCharFilter(boolean accept,
char... charArray)
accept - - if true exactly the chars given by charArray are accepted
(whitelist), if false exactly these chars are NOT accepted (blacklist).charArray - are the chars to accept or to reject.public boolean accept(char c)
c should be accepted.accept in interface CharFilterc - is the character to check.true if the given character c is acceptable, false if it
should be filtered.Copyright © 2001–2015 mmm-Team. All rights reserved.