public enum DenyAll extends Enum<DenyAll> implements CommandMessageFilter
Enum Constant and Description |
---|
INSTANCE
Singleton instance of the
DenyAll filter |
Modifier and Type | Method and Description |
---|---|
CommandMessageFilter |
and(CommandMessageFilter other)
Returns a filter that matches when both this instance and the given
other match. |
boolean |
matches(CommandMessage<?> message)
Indicates whether the given
commandMessage matches this filter. |
CommandMessageFilter |
negate()
Returns a filter that matches when this instance doesn't, and vice versa.
|
CommandMessageFilter |
or(CommandMessageFilter other)
Returns a filter that matches when either this instance or the given
other matches. |
String |
toString() |
static DenyAll |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static DenyAll[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static DenyAll[] values()
for (DenyAll c : DenyAll.values()) System.out.println(c);
public static DenyAll valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic boolean matches(CommandMessage<?> message)
CommandMessageFilter
commandMessage
matches this filter.matches
in interface CommandMessageFilter
message
- The message to matchtrue
if the command matches, otherwise false
public CommandMessageFilter and(CommandMessageFilter other)
CommandMessageFilter
other
match.and
in interface CommandMessageFilter
other
- The other filter to match againstpublic CommandMessageFilter negate()
CommandMessageFilter
negate
in interface CommandMessageFilter
public CommandMessageFilter or(CommandMessageFilter other)
CommandMessageFilter
other
matches.or
in interface CommandMessageFilter
other
- the other filter to match againstCopyright © 2010–2020. All rights reserved.