public class CommandNameFilter extends Object implements Predicate<CommandMessage<?>>, Serializable
Constructor and Description |
---|
CommandNameFilter(Set<String> commandNames)
Initializes a
CommandNameFilter for the given set of commandNames . |
CommandNameFilter(String commandName)
Initializes a
CommandNameFilter for a single command name. |
Modifier and Type | Method and Description |
---|---|
Predicate<CommandMessage<?>> |
and(Predicate<? super CommandMessage<?>> other) |
boolean |
equals(Object o) |
int |
hashCode() |
Predicate<CommandMessage<?>> |
negate() |
Predicate<CommandMessage<?>> |
or(Predicate<? super CommandMessage<?>> other) |
boolean |
test(CommandMessage commandMessage) |
String |
toString() |
public CommandNameFilter(Set<String> commandNames)
CommandNameFilter
for the given set of commandNames
.commandNames
- commands that can be handledpublic CommandNameFilter(String commandName)
CommandNameFilter
for a single command name.commandName
- command that can be handledpublic boolean test(CommandMessage commandMessage)
test
in interface Predicate<CommandMessage<?>>
public Predicate<CommandMessage<?>> negate()
negate
in interface Predicate<CommandMessage<?>>
public Predicate<CommandMessage<?>> and(Predicate<? super CommandMessage<?>> other)
and
in interface Predicate<CommandMessage<?>>
public Predicate<CommandMessage<?>> or(Predicate<? super CommandMessage<?>> other)
or
in interface Predicate<CommandMessage<?>>
Copyright © 2010–2017. All rights reserved.