public enum CmdType extends Enum<CmdType>
Enum Constant and Description |
---|
ADDADDRESSMAPPING |
ADDDOMAIN |
ADDREGEXMAPPING |
ADDUSER |
LISTDOMAINS |
LISTMAPPINGS |
LISTUSERDOMAINMAPPINGS |
LISTUSERS |
REMOVEADDRESSMAPPING |
REMOVEDOMAIN |
REMOVEREGEXMAPPING |
REMOVEUSER |
SETPASSWORD |
Modifier and Type | Method and Description |
---|---|
int |
getArguments()
Return the value of arguments.
|
String |
getCommand()
Return the value of command.
|
boolean |
hasCorrectArguments(int arguments)
Validate that the number of arguments match the passed value.
|
static CmdType |
lookup(String command)
Return a CmdType enumeration that matches the passed command.
|
static CmdType |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static CmdType[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final CmdType ADDUSER
public static final CmdType REMOVEUSER
public static final CmdType LISTUSERS
public static final CmdType ADDDOMAIN
public static final CmdType REMOVEDOMAIN
public static final CmdType LISTDOMAINS
public static final CmdType LISTMAPPINGS
public static final CmdType LISTUSERDOMAINMAPPINGS
public static final CmdType ADDADDRESSMAPPING
public static final CmdType REMOVEADDRESSMAPPING
public static final CmdType ADDREGEXMAPPING
public static final CmdType REMOVEREGEXMAPPING
public static final CmdType SETPASSWORD
public static CmdType[] values()
for (CmdType c : CmdType.values()) System.out.println(c);
public static CmdType 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 hasCorrectArguments(int arguments)
arguments
- The number of argument to compare.public static CmdType lookup(String command)
command
- The command to use for lookup.public String getCommand()
public int getArguments()
Copyright © 2002-2012 The Apache Software Foundation. All Rights Reserved.