Class RegexFilter
- java.lang.Object
-
- com.jtelegram.api.commands.filters.AbstractCommandFilter
-
- com.jtelegram.api.commands.filters.RegexFilter
-
- All Implemented Interfaces:
CommandFilter
public class RegexFilter extends AbstractCommandFilter
ACommandFiltertesting if the command matches a certainregular expression pattern.
-
-
Constructor Summary
Constructors Constructor Description RegexFilter(java.util.regex.Pattern pattern, CommandFilter... children)Creates a RegexFilter with given children.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleanpreTest(TextMessageEvent event, Command command)-
Methods inherited from class com.jtelegram.api.commands.filters.AbstractCommandFilter
test
-
-
-
-
Constructor Detail
-
RegexFilter
public RegexFilter(java.util.regex.Pattern pattern, CommandFilter... children)Creates a RegexFilter with given children.- Parameters:
pattern- The pattern to match againstchildren- The children filters, which will be checked in order if this filter tests to betrue
-
-
Method Detail
-
preTest
protected boolean preTest(TextMessageEvent event, Command command)
- Specified by:
preTestin classAbstractCommandFilter
-
-