icegem-cache-utils/src/main/java/com/googlecode/icegem/cacheutils/Launcher.java
private static int findCommandIndex(String[] args) {
	int commandIndex = -1;

	for (int i = 0; i < args.length; i++) {
	    for (Command command : Command.values()) {
		if (command.getName().equals(args[i].trim())) {
		    commandIndex = i;
		    
		    break;
		}
	    }
	}

	return commandIndex;
    }
private static int findCommandIndex(String[] args) {
	int commandIndex = -1;

	for (int i = 0; i < args.length; i++) {
	    for (Command command : Command.values()) {
		if (command.getName().equals(args[i].trim())) {
		    commandIndex = i;
		    
		    break;
		}
	    }
	}

	return commandIndex;
    }
Looks for the index of command in the specified array.

@param args
- Arguments.
@return - Index of command, or -1 if command is not found in the array.