Class TextFilter
- java.lang.Object
-
- com.jtelegram.api.commands.filters.AbstractCommandFilter
-
- com.jtelegram.api.commands.filters.TextFilter
-
- All Implemented Interfaces:
CommandFilter
public class TextFilter extends AbstractCommandFilter
ACommandFilter
testing if the command is a given string, with optional case sensitivity.
-
-
Constructor Summary
Constructors Constructor Description TextFilter(java.lang.String command, boolean caseSensitive, CommandFilter... children)
Creates a TextFilter with given children.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
preTest(TextMessageEvent event, Command command)
-
Methods inherited from class com.jtelegram.api.commands.filters.AbstractCommandFilter
test
-
-
-
-
Constructor Detail
-
TextFilter
public TextFilter(java.lang.String command, boolean caseSensitive, CommandFilter... children)
Creates a TextFilter with given children.- Parameters:
command
- The command name to matchcaseSensitive
- Whether to enforce case sensitivity or notchildren
- 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:
preTest
in classAbstractCommandFilter
-
-