/** * Looks up a Server launcher command by name. The equality comparison on name is * case-insensitive. * * @param name a String value indicating the name of the Server launcher command. * @return an enumerated type representing the command name or null if the no such command with * the specified name exists. */ public static Command valueOfName(final String name) { for (final Command command : values()) { if (command.getName().equalsIgnoreCase(name)) { return command; } } return null; }