src/main/java/seedu/taskmanager/logic/parser/UpdateCommandParser.java
/**
     * Parses {@code Collection<String> tags} into an
     * {@code Optional<UniqueTagList>} if {@code tags} is non-empty. If
     * {@code tags} contain only one element which is an empty string, it will
     * be parsed into a {@code Optional<UniqueTagList>} containing zero tags.
     */
Parses  Collection tags into an
Optional if  tags is non-empty. If
tags contain only one element which is an empty string, it will
be parsed into a  Optional containing zero tags.
Parses Collection tags into an Optional if tags is non - empty . If tags contain only one element which is an empty string it will be parsed into a Optional containing zero tags .
private Optional<UniqueCategoryList> parseCategoriesForUpdate(Collection<String> categories)
            throws IllegalValueException {
        assert categories != null;
        if (categories.isEmpty()) {
            return Optional.empty();
        }
        Collection<String> categorySet = categories.size() == 1 && categories.contains("") ? Collections.emptySet()
                : categories;
        return Optional.of(ParserUtil.parseCategories(categorySet));
    }
private Optional < UniqueCategoryList > parseCategoriesForUpdate ( Collection < String > categories ) throws IllegalValueException { assert categories != null ; if ( categories . isEmpty ( ) ) { return Optional . empty ( ) ; } Collection < String > categorySet = categories . size ( ) == 1 && categories . contains ( "" ) ? Collections . emptySet ( ) : categories ; return Optional . of ( ParserUtil . parseCategories ( categorySet ) ) ; }
Parses {@code Collection<String> tags} into an
 {@code Optional<UniqueTagList>} if {@code tags} is non-empty.
Parses { @code Collection<String > tags } into an { @code Optional<UniqueTagList > } if { @code tags } is non - empty .