final int N = COMMANDS.length; for (int i=0; i<N; i++) { Command c = COMMANDS[i]; if (c.name().equals(name)) { return c; } } return null;
if (args.length >= 1) { Command c = lookupCommand(args[0]); if (c != null) { c.run(args); return; } } COMMAND_HELP.run(args);