/** * Iterates the list of arguments in search of the target Locator launcher command. * * @param args an array of arguments from which to search for the Locator launcher command. * @see org.apache.geode.distributed.LocatorLauncher.Command#valueOfName(String) * @see #parseArguments(String...) */ protected void parseCommand(final String... args) { // search the list of arguments for the command; technically, the command should be the first // argument in the // list, but does it really matter? stop after we find one valid command. if (args != null) { for (String arg : args) { final Command command = Command.valueOfName(arg); if (command != null) { setCommand(command); break; } } } }
/** * Determines whether the specified name refers to a valid Locator launcher command, as defined * by this enumerated type. * * @param name a String value indicating the potential name of a Locator launcher command. * @return a boolean indicating whether the specified name for a Locator launcher command is * valid. */ public static boolean isCommand(final String name) { return (valueOfName(name) != null); }