src/main/java/seedu/address/logic/commands/EditCommand.java
/**
         * Returns an amenity set which has {@code amenitiesRemoved} removed from {@code existingAmenities}.
         */
Returns an amenity set which has  amenitiesRemoved removed from  existingAmenities.
Returns an amenity set which has amenitiesRemoved removed from existingAmenities .
public Set<Amenity> combineAmenitiesRemoved(Set<Amenity> amenitiesRemoved, Set<Amenity> existingAmenities)
                throws CommandException {
            Set<Amenity> result = existingAmenities;
            for (Amenity amenity: amenitiesRemoved) {
                if (!existingAmenities.contains(amenity)) {
                    throw new CommandException(MESSAGE_REMOVAL_CONSTRAINTS);
                } else {
                    result = removeField(result, amenity);
                }
            }
            return result;
        }
public Set < Amenity > combineAmenitiesRemoved ( Set < Amenity > amenitiesRemoved , Set < Amenity > existingAmenities ) throws CommandException { Set < Amenity > result = existingAmenities ; for ( Amenity amenity : amenitiesRemoved ) { if ( ! existingAmenities . contains ( amenity ) ) { throw new CommandException ( MESSAGE_REMOVAL_CONSTRAINTS ) ; } else { result = removeField ( result , amenity ) ; } } return result ; }
Returns an amenity set which has {@code amenitiesRemoved} removed from {@code existingAmenities}.
Returns an amenity set which has { @code amenitiesRemoved } removed from { @code existingAmenities } .