/** * Iterates the list of arguments in search of the target Server launcher command. * * @param args an array of arguments from which to search for the Server launcher command. * @see org.apache.geode.distributed.ServerLauncher.Command#valueOfName(String) * @see #parseArguments(String...) */ protected void parseCommand(final String... args) { if (args != null) { for (String arg : args) { Command command = Command.valueOfName(arg); if (command != null) { setCommand(command); break; } } } }
/** * Determines whether the specified name refers to a valid Server launcher command, as defined * by this enumerated type. * * @param name a String value indicating the potential name of a Server launcher command. * @return a boolean indicating whether the specified name for a Server launcher command is * valid. */ public static boolean isCommand(final String name) { return valueOfName(name) != null; }