@@ -0,0 +1,1247 @@
+package seedu.bulletjournal.logic.parser;%0A%0A/**%0A * Provides variations of commands%0A * Note: hard-coded for v0.2, will implement nlp for future versions%0A * @author Tu An - arishuynhvan%0A */%0Aimport static seedu.bulletjournal.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;%0A%0Apublic class FlexibleCommand %7B%0A%0A%09private String commandFromUser =%22%22;%0A%0A%09private String%5B%5D commandGroups = new String%5B%5D %7B%0A%09%09%09%22add a create new%22,%0A%09%09%09%22clear clr c empty%22,%0A%09%09%09%22delete d del remove rm%22,%0A%09%09%09%22edit e change %22,%0A%09%09%09%22exit close logout%22,%0A%09%09%09%22find f search lookup%22,%0A%09%09%09%22help h manual instruction instructions%22,%0A%09%09%09%22list l ls show display showall%22,%0A%09%09%09%22select s choose%22,%0A%09%7D;%0A%0A%09/**%0A%09 * Constructor must take in a valid string input%0A%09 * @param cfu%0A%09 */%0A%09public FlexibleCommand(String cfu)%7B%0A%09%09commandFromUser = cfu;%0A%09%7D%0A%0A%09public String getCommandWord()%7B%0A%09%09for (String commandGroup: commandGroups)%7B%0A%09%09%09for (String command: commandGroup.split(%22 %22))%7B%0A%09%09%09%09if (commandFromUser == command)%0A%09%09%09%09%09return commandGroup.split(%22 %22)%5B0%5D;%0A%09%09%09%7D%0A%09%09%7D%0A%09%09return commandFromUser;%0A%09%7D%0A%0A%09public boolean isValidCommand()%7B%0A%09%09for (String commandGroup: commandGroups)%7B%0A%09%09%09for (String command: commandGroup.split(%22 %22))%7B%0A%09%09%09%09if (commandFromUser == command)%0A%09%09%09%09%09return true;%0A%09%09%09%7D%0A%09%09%7D%0A%09%09return false;%0A%09%7D%0A%7D%0A

Create FlexibleCommand class