Esempio n. 1
0
 /**
  * Returns the command constant with the specified name. In contrast to {@link #valueOf(String)}
  * it returns a null instead of throwing an exception if a command constant was not found.
  *
  * @param name the name of the constant to return
  * @return the command constant with the specified name, else <code>null</code>
  */
 public static Command getCommand(final String name) {
   try {
     return Command.valueOf(name);
   } catch (Exception e) {
     return null;
   }
 }