public class AndCommandMessageFilter extends Object implements CommandMessageFilter
CommandMessageFilter
implementation that matches whenever both supplied CommandMessageFilter
instances match.Constructor and Description |
---|
AndCommandMessageFilter(CommandMessageFilter first,
CommandMessageFilter second)
Initialize the filter to match when both the
first and the second filter match. |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
int |
hashCode() |
boolean |
matches(CommandMessage<?> commandMessage)
Indicates whether the given
commandMessage matches this filter. |
String |
toString() |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
and, negate, or
@ConstructorProperties(value={"first","second"}) public AndCommandMessageFilter(CommandMessageFilter first, CommandMessageFilter second)
first
and the second
filter match.first
- the first filter to matchsecond
- the second filter to matchpublic boolean matches(@Nonnull CommandMessage<?> commandMessage)
CommandMessageFilter
commandMessage
matches this filter.matches
in interface CommandMessageFilter
commandMessage
- the message to matchtrue
if the command matches, otherwise false
Copyright © 2010–2024. All rights reserved.