src/main/java/seedu/address/storage/storageCourse/JsonCourseSerializableAddressBook.java
public CourseAddressBook toModelType() throws IllegalValueException, CommandException {
        CourseAddressBook courseAddressBook = new CourseAddressBook();
        for (JsonAdaptedCourse jsonAdaptedCourse : courses) {
            Course course = jsonAdaptedCourse.toModelType();
            if (courseAddressBook.has(course)) {
                throw new IllegalValueException(MESSAGE_DUPLICATE_COURSE);
            }
            courseAddressBook.add(course);
        }
        return courseAddressBook;
    }
/**
     * Converts this address book into the model's {@code AddressBook} object.
     *
     * @throws IllegalValueException if there were any data constraints violated.
     */
Converts this address book into the model's  AddressBook object.
@throws IllegalValueException if there were any data constraints violated.
Converts this address book into the model ' s AddressBook object . @throws IllegalValueException if there were any data constraints violated .
public CourseAddressBook toModelType() throws IllegalValueException, CommandException {
        CourseAddressBook courseAddressBook = new CourseAddressBook();
        for (JsonAdaptedCourse jsonAdaptedCourse : courses) {
            Course course = jsonAdaptedCourse.toModelType();
            if (courseAddressBook.has(course)) {
                throw new IllegalValueException(MESSAGE_DUPLICATE_COURSE);
            }
            courseAddressBook.add(course);
        }
        return courseAddressBook;
    }
public CourseAddressBook toModelType ( ) throws IllegalValueException , CommandException { CourseAddressBook courseAddressBook = new CourseAddressBook ( ) ; for ( JsonAdaptedCourse jsonAdaptedCourse : courses ) { Course course = jsonAdaptedCourse . toModelType ( ) ; if ( courseAddressBook . has ( course ) ) { throw new IllegalValueException ( MESSAGE_DUPLICATE_COURSE ) ; } courseAddressBook . add ( course ) ; } return courseAddressBook ; }
Converts this address book into the model's {@code AddressBook} object.
Converts this address book into the model ' s { @code AddressBook } object .