src/main/java/seedu/address/storage/storageProgress/JsonAdaptedProgress.java
public Progress toModelType() throws IllegalValueException, CommandException {
        if (assignmentID == null) {
            throw new IllegalValueException(
                    String.format(MISSING_FIELD_MESSAGE_FORMAT, ID.class.getSimpleName()));
        }
        if (!ID.isValidId(assignmentID)) {
            throw new IllegalValueException(ID.MESSAGE_CONSTRAINTS);
        }
        final ID modelAssignmentID = new ID(assignmentID);

        if (studentID == null) {
            throw new IllegalValueException(
                    String.format(MISSING_FIELD_MESSAGE_FORMAT, ID.class.getSimpleName()));
        }
        if (!ID.isValidId(studentID)) {
            throw new IllegalValueException(ID.MESSAGE_CONSTRAINTS);
        }
        final ID modelStudentID = new ID(studentID);

        if (isDone == null) {
            throw new IllegalValueException(
                    String.format(MISSING_FIELD_MESSAGE_FORMAT, Boolean.class.getSimpleName())
            );
        }
        boolean isTrue = Boolean.TRUE.toString().equals(isDone);
        boolean isFalse = Boolean.FALSE.toString().equals(isDone);

        // if its not true and if its not false, means that there's an issue
        if (!isTrue && !isFalse) {
            throw new IllegalValueException("isDone must be in the format of true/false");
        }

        final Boolean modelIsDone = Boolean.valueOf(isDone);

        CompositeID curr = new CompositeID(modelAssignmentID, modelStudentID);

        return new Progress(curr, modelIsDone);
    }
/**
     * Converts this Jackson-friendly adapted Assignment object into the model's {@code Assignment} object.
     *
     * @throws IllegalValueException if there were any data constraints violated in the adapted
     *                               Assignment.
     */
Converts this Jackson-friendly adapted Assignment object into the model's  Assignment object.
@throws IllegalValueException if there were any data constraints violated in the adapted
Assignment.
Converts this Jackson - friendly adapted Assignment object into the model ' s Assignment object . @throws IllegalValueException if there were any data constraints violated in the adapted Assignment .
public Progress toModelType() throws IllegalValueException, CommandException {
        if (assignmentID == null) {
            throw new IllegalValueException(
                    String.format(MISSING_FIELD_MESSAGE_FORMAT, ID.class.getSimpleName()));
        }
        if (!ID.isValidId(assignmentID)) {
            throw new IllegalValueException(ID.MESSAGE_CONSTRAINTS);
        }
        final ID modelAssignmentID = new ID(assignmentID);
        if (studentID == null) {
            throw new IllegalValueException(
                    String.format(MISSING_FIELD_MESSAGE_FORMAT, ID.class.getSimpleName()));
        }
        if (!ID.isValidId(studentID)) {
            throw new IllegalValueException(ID.MESSAGE_CONSTRAINTS);
        }
        final ID modelStudentID = new ID(studentID);
        if (isDone == null) {
            throw new IllegalValueException(
                    String.format(MISSING_FIELD_MESSAGE_FORMAT, Boolean.class.getSimpleName())
            );
        }
        boolean isTrue = Boolean.TRUE.toString().equals(isDone);
        boolean isFalse = Boolean.FALSE.toString().equals(isDone);
        if (!isTrue && !isFalse) {
            throw new IllegalValueException("isDone must be in the format of true/false");
        }
        final Boolean modelIsDone = Boolean.valueOf(isDone);
        CompositeID curr = new CompositeID(modelAssignmentID, modelStudentID);
        return new Progress(curr, modelIsDone);
    }
public Progress toModelType ( ) throws IllegalValueException , CommandException { if ( assignmentID == null ) { throw new IllegalValueException ( String . format ( MISSING_FIELD_MESSAGE_FORMAT , ID . class . getSimpleName ( ) ) ) ; } if ( ! ID . isValidId ( assignmentID ) ) { throw new IllegalValueException ( ID . MESSAGE_CONSTRAINTS ) ; } final ID modelAssignmentID = new ID ( assignmentID ) ; if ( studentID == null ) { throw new IllegalValueException ( String . format ( MISSING_FIELD_MESSAGE_FORMAT , ID . class . getSimpleName ( ) ) ) ; } if ( ! ID . isValidId ( studentID ) ) { throw new IllegalValueException ( ID . MESSAGE_CONSTRAINTS ) ; } final ID modelStudentID = new ID ( studentID ) ; if ( isDone == null ) { throw new IllegalValueException ( String . format ( MISSING_FIELD_MESSAGE_FORMAT , Boolean . class . getSimpleName ( ) ) ) ; } boolean isTrue = Boolean . TRUE . toString ( ) . equals ( isDone ) ; boolean isFalse = Boolean . FALSE . toString ( ) . equals ( isDone ) ; if ( ! isTrue && ! isFalse ) { throw new IllegalValueException ( "isDone must be in the format of true/false" ) ; } final Boolean modelIsDone = Boolean . valueOf ( isDone ) ; CompositeID curr = new CompositeID ( modelAssignmentID , modelStudentID ) ; return new Progress ( curr , modelIsDone ) ; }
Converts this Jackson-friendly adapted Assignment object into the model's {@code Assignment} object.
Converts this Jackson - friendly adapted Assignment object into the model ' s { @code Assignment } object .
// if its not true and if its not false, means that there's an issue