src/main/java/seedu/taskmanager/logic/parser/UpdateCommandParser.java
/*
     * Checks to ensure correct combinations of arguments are added by user when
     * updating tasks in the task manager
     */
Checks to ensure correct combinations of arguments are added by user when
updating tasks in the task manager
Checks to ensure correct combinations of arguments are added by user when updating tasks in the task manager
private void updateTaskInputValidation(Optional<String> onPrefixInput, Optional<String> byPrefixInput,
            Optional<String> fromPrefixInput, Optional<String> toPrefixInput) throws NoSuchElementException {
        if (!onPrefixInput.isPresent() || !byPrefixInput.isPresent() || !fromPrefixInput.isPresent()
                || !toPrefixInput.isPresent()) {
            if ((onPrefixInput.isPresent()) && ((byPrefixInput.isPresent()) || (fromPrefixInput.isPresent()))) {
                throw new NoSuchElementException();
            }
            if ((byPrefixInput.isPresent())
                    && ((onPrefixInput.isPresent()) || (fromPrefixInput.isPresent()) || (toPrefixInput.isPresent()))) {
                throw new NoSuchElementException();
            }
            if (((fromPrefixInput.isPresent()) && ((onPrefixInput.isPresent()) || (byPrefixInput.isPresent())))) {
                throw new NoSuchElementException();
            }
        }
    }
private void updateTaskInputValidation ( Optional < String > onPrefixInput , Optional < String > byPrefixInput , Optional < String > fromPrefixInput , Optional < String > toPrefixInput ) throws NoSuchElementException { if ( ! onPrefixInput . isPresent ( ) || ! byPrefixInput . isPresent ( ) || ! fromPrefixInput . isPresent ( ) || ! toPrefixInput . isPresent ( ) ) { if ( ( onPrefixInput . isPresent ( ) ) && ( ( byPrefixInput . isPresent ( ) ) || ( fromPrefixInput . isPresent ( ) ) ) ) { throw new NoSuchElementException ( ) ; } if ( ( byPrefixInput . isPresent ( ) ) && ( ( onPrefixInput . isPresent ( ) ) || ( fromPrefixInput . isPresent ( ) ) || ( toPrefixInput . isPresent ( ) ) ) ) { throw new NoSuchElementException ( ) ; } if ( ( ( fromPrefixInput . isPresent ( ) ) && ( ( onPrefixInput . isPresent ( ) ) || ( byPrefixInput . isPresent ( ) ) ) ) ) { throw new NoSuchElementException ( ) ; } } }
Checks to ensure correct combinations of arguments are added by user when
 updating tasks in the task manager
Checks to ensure correct combinations of arguments are added by user when updating tasks in the task manager