monkey-island/src/fr/eseo/game/command/CommandEnum.java
public static CommandEnum fromString(String command) throws NullPointerException {
		if (command != null) {
			for (CommandEnum cmd : CommandEnum.values()) {
				if (cmd.toString().equals(command)) {
					return cmd;
				}
			}
		}
		throw new NullPointerException("This command does not exist : " + command);
	}
/**
	 * Parse the command string to the enum command.
	 * 
	 * @param command
	 *            String command.
	 * @return commandEnum The enum command.
	 * @throws NullPointerException
	 *             NullPointerException.
	 */
Parse the command string to the enum command.

@param command
String command.
@return commandEnum The enum command.
Parse the command string to the enum command . @param command String command . @return commandEnum The enum command .
public static CommandEnum fromString(String command) throws NullPointerException {
		if (command != null) {
			for (CommandEnum cmd : CommandEnum.values()) {
				if (cmd.toString().equals(command)) {
					return cmd;
				}
			}
		}
		throw new NullPointerException("This command does not exist : " + command);
	}
public static CommandEnum fromString ( String command ) throws NullPointerException { if ( command != null ) { for ( CommandEnum cmd : CommandEnum . values ( ) ) { if ( cmd . toString ( ) . equals ( command ) ) { return cmd ; } } } throw new NullPointerException ( "This command does not exist : " + command ) ; }
Parse the command string to the enum command.
Parse the command string to the enum command .