Class RowFilters
RowFilters. Trigger is the missing of Pattern/Regex+matchflags factory method in core. Can't do much other than cinvalid input: '&p' core as both abstract base class GeneralFilter and concrete RowFilter are private. Expose the base as public for custom subclasses
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classCinvalid input: '&P' from core Swing to allow subclassing.private static classCinvalid input: '&P' from core to allow richer factory methods. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <M,I> RowFilter <M, I> regexFilter(int matchFlags, String regex, int... indices) Returns aRowFilterthat uses a regular expression to determine which entries to include.static <M,I> RowFilter <M, I> regexFilter(String regex, int... indices) Returns aRowFilterthat uses a regular expression to determine which entries to include.static <M,I> RowFilter <M, I> regexFilter(Pattern pattern, int... indices) Returns aRowFilterthat uses a regular expression to determine which entries to include.
-
Constructor Details
-
RowFilters
private RowFilters()
-
-
Method Details
-
regexFilter
Returns aRowFilterthat uses a regular expression to determine which entries to include. Only entries with at least one matching value are included. For example, the following creates aRowFilterthat includes entries with at least one value starting with "a":RowFilter.regexFilter("^a");The returned filter uses
Matcher.find()to test for inclusion. To test for exact matches use the characters '^' and '$' to match the beginning and end of the string respectively. For example, "^foo$" includes only rows whose string is exactly "foo" and not, for example, "food". SeePatternfor a complete description of the supported regular-expression constructs.- Parameters:
regex- the regular expression to filter onindices- the indices of the values to check. If not supplied all values are evaluated- Returns:
- a
RowFilterimplementing the specified criteria - Throws:
NullPointerException- ifregexisnullIllegalArgumentException- if any of theindicesare < 0PatternSyntaxException- ifregexis not a valid regular expression.- See Also:
-
regexFilter
Returns aRowFilterthat uses a regular expression to determine which entries to include. Only entries with at least one matching value are included. For example, the following creates aRowFilterthat includes entries with at least one value starting with "a" ignoring case:RowFilter.regexFilter(Pattern.CASE_INSENSITIVE, "^a");
The returned filter uses
Matcher.find()to test for inclusion. To test for exact matches use the characters '^' and '$' to match the beginning and end of the string respectively. For example, "^foo$" includes only rows whose string is exactly "foo" and not, for example, "food". SeePatternfor a complete description of the supported regular-expression constructs.- Parameters:
matchFlags- Match flags, a bit mask that may includePattern.CASE_INSENSITIVE,Pattern.MULTILINE,Pattern.DOTALL,Pattern.UNICODE_CASE,Pattern.CANON_EQ,Pattern.UNIX_LINES,Pattern.LITERALandPattern.COMMENTSregex- the regular expression to filter onindices- the indices of the values to check. If not supplied all values are evaluated- Returns:
- a
RowFilterimplementing the specified criteria - Throws:
NullPointerException- ifregexisnullIllegalArgumentException- if any of theindicesare < 0IllegalArgumentException- If bit values other than those corresponding to the defined match flags are set in flagsPatternSyntaxException- ifregexis not a valid regular expression.- See Also:
-
regexFilter
Returns aRowFilterthat uses a regular expression to determine which entries to include.- Parameters:
pattern- the Pattern to use for matchingindices- the indices of the values to check. If not supplied all values are evaluated- Returns:
- a
RowFilterimplementing the specified criteria - Throws:
NullPointerException- ifpatternisnull- See Also:
-