src/main/java/seedu/address/logic/commands/job/EditJob.java
private static Job createEditedJob(Job jobToEdit,
                                                   EditJobDescriptor editJobDescriptor) {
        assert jobToEdit != null;

        JobTitle updatedJobTitle = editJobDescriptor.getJobTitle().orElse(jobToEdit.getJobTitle());
        CompanyName updatedCompanyName = editJobDescriptor.getCompanyName().orElse(jobToEdit.getCompany());
        Address updatedAddress = editJobDescriptor.getAddress().orElse(jobToEdit.getAddress());
        Qualification updatedQualification = editJobDescriptor.getQualification().orElse(jobToEdit.getQualification());
        Position updatedPosition = editJobDescriptor.getPosition().orElse(jobToEdit.getPosition());
        Salary updatedSalary = editJobDescriptor.getSalary().orElse((jobToEdit.getSalary()));

        // Get the old values
        JobId updatedJobId = jobToEdit.getJobId();
        JobStatus updatedJobStatus = jobToEdit.getJobStatus();

        return new Job(updatedJobTitle, updatedCompanyName, updatedJobId, updatedAddress, updatedQualification,
                updatedJobStatus, updatedPosition, updatedSalary);
    }
/**
     * Creates and returns a {@code Job} with the details of {@code jobToEdit}
     * edited with {@code editJobDescriptor}.
     */
Creates and returns a  Job with the details of  jobToEdit
edited with  editJobDescriptor.
Creates and returns a Job with the details of jobToEdit edited with editJobDescriptor .
private static Job createEditedJob(Job jobToEdit,
                                                   EditJobDescriptor editJobDescriptor) {
        assert jobToEdit != null;
        JobTitle updatedJobTitle = editJobDescriptor.getJobTitle().orElse(jobToEdit.getJobTitle());
        CompanyName updatedCompanyName = editJobDescriptor.getCompanyName().orElse(jobToEdit.getCompany());
        Address updatedAddress = editJobDescriptor.getAddress().orElse(jobToEdit.getAddress());
        Qualification updatedQualification = editJobDescriptor.getQualification().orElse(jobToEdit.getQualification());
        Position updatedPosition = editJobDescriptor.getPosition().orElse(jobToEdit.getPosition());
        Salary updatedSalary = editJobDescriptor.getSalary().orElse((jobToEdit.getSalary()));
        JobId updatedJobId = jobToEdit.getJobId();
        JobStatus updatedJobStatus = jobToEdit.getJobStatus();
        return new Job(updatedJobTitle, updatedCompanyName, updatedJobId, updatedAddress, updatedQualification,
                updatedJobStatus, updatedPosition, updatedSalary);
    }
private static Job createEditedJob ( Job jobToEdit , EditJobDescriptor editJobDescriptor ) { assert jobToEdit != null ; JobTitle updatedJobTitle = editJobDescriptor . getJobTitle ( ) . orElse ( jobToEdit . getJobTitle ( ) ) ; CompanyName updatedCompanyName = editJobDescriptor . getCompanyName ( ) . orElse ( jobToEdit . getCompany ( ) ) ; Address updatedAddress = editJobDescriptor . getAddress ( ) . orElse ( jobToEdit . getAddress ( ) ) ; Qualification updatedQualification = editJobDescriptor . getQualification ( ) . orElse ( jobToEdit . getQualification ( ) ) ; Position updatedPosition = editJobDescriptor . getPosition ( ) . orElse ( jobToEdit . getPosition ( ) ) ; Salary updatedSalary = editJobDescriptor . getSalary ( ) . orElse ( ( jobToEdit . getSalary ( ) ) ) ; JobId updatedJobId = jobToEdit . getJobId ( ) ; JobStatus updatedJobStatus = jobToEdit . getJobStatus ( ) ; return new Job ( updatedJobTitle , updatedCompanyName , updatedJobId , updatedAddress , updatedQualification , updatedJobStatus , updatedPosition , updatedSalary ) ; }
Creates and returns a {@code Job} with the details of {@code jobToEdit}
 edited with {@code editJobDescriptor}.
Creates and returns a { @code Job } with the details of { @code jobToEdit } edited with { @code editJobDescriptor } .
// Get the old values