src/main/java/seedu/address/logic/commands/EditCommand.java
private static Parcel createEditedParcel(ReadOnlyParcel parcelToEdit,
                                             EditParcelDescriptor editParcelDescriptor) {
        assert parcelToEdit != null;

        TrackingNumber updatedTrackingNumber = editParcelDescriptor.getTrackingNumber()
                .orElse(parcelToEdit.getTrackingNumber());
        Name updatedName = editParcelDescriptor.getName().orElse(parcelToEdit.getName());
        Phone updatedPhone = editParcelDescriptor.getPhone().orElse(parcelToEdit.getPhone());
        Email updatedEmail = editParcelDescriptor.getEmail().orElse(parcelToEdit.getEmail());
        Address updatedAddress = editParcelDescriptor.getAddress().orElse(parcelToEdit.getAddress());
        DeliveryDate updatedDeliveryDate = editParcelDescriptor.getDeliveryDate()
                                           .orElse(parcelToEdit.getDeliveryDate());
        Status updatedStatus = editParcelDescriptor.getStatus().orElse(parcelToEdit.getStatus());
        Set<Tag> updatedTags = editParcelDescriptor.getTags().orElse(parcelToEdit.getTags());

        return new Parcel(updatedTrackingNumber, updatedName, updatedPhone, updatedEmail, updatedAddress,
                          updatedDeliveryDate, updatedStatus, updatedTags);
    }
/**
     * Creates and returns a {@code Parcel} with the details of {@code parcelToEdit}
     * edited with {@code editParcelDescriptor}.
     */
Creates and returns a  Parcel with the details of  parcelToEdit
edited with  editParcelDescriptor.
Creates and returns a Parcel with the details of parcelToEdit edited with editParcelDescriptor .
private static Parcel createEditedParcel(ReadOnlyParcel parcelToEdit,
                                             EditParcelDescriptor editParcelDescriptor) {
        assert parcelToEdit != null;
        TrackingNumber updatedTrackingNumber = editParcelDescriptor.getTrackingNumber()
                .orElse(parcelToEdit.getTrackingNumber());
        Name updatedName = editParcelDescriptor.getName().orElse(parcelToEdit.getName());
        Phone updatedPhone = editParcelDescriptor.getPhone().orElse(parcelToEdit.getPhone());
        Email updatedEmail = editParcelDescriptor.getEmail().orElse(parcelToEdit.getEmail());
        Address updatedAddress = editParcelDescriptor.getAddress().orElse(parcelToEdit.getAddress());
        DeliveryDate updatedDeliveryDate = editParcelDescriptor.getDeliveryDate()
                                           .orElse(parcelToEdit.getDeliveryDate());
        Status updatedStatus = editParcelDescriptor.getStatus().orElse(parcelToEdit.getStatus());
        Set<Tag> updatedTags = editParcelDescriptor.getTags().orElse(parcelToEdit.getTags());
        return new Parcel(updatedTrackingNumber, updatedName, updatedPhone, updatedEmail, updatedAddress,
                          updatedDeliveryDate, updatedStatus, updatedTags);
    }
private static Parcel createEditedParcel ( ReadOnlyParcel parcelToEdit , EditParcelDescriptor editParcelDescriptor ) { assert parcelToEdit != null ; TrackingNumber updatedTrackingNumber = editParcelDescriptor . getTrackingNumber ( ) . orElse ( parcelToEdit . getTrackingNumber ( ) ) ; Name updatedName = editParcelDescriptor . getName ( ) . orElse ( parcelToEdit . getName ( ) ) ; Phone updatedPhone = editParcelDescriptor . getPhone ( ) . orElse ( parcelToEdit . getPhone ( ) ) ; Email updatedEmail = editParcelDescriptor . getEmail ( ) . orElse ( parcelToEdit . getEmail ( ) ) ; Address updatedAddress = editParcelDescriptor . getAddress ( ) . orElse ( parcelToEdit . getAddress ( ) ) ; DeliveryDate updatedDeliveryDate = editParcelDescriptor . getDeliveryDate ( ) . orElse ( parcelToEdit . getDeliveryDate ( ) ) ; Status updatedStatus = editParcelDescriptor . getStatus ( ) . orElse ( parcelToEdit . getStatus ( ) ) ; Set < Tag > updatedTags = editParcelDescriptor . getTags ( ) . orElse ( parcelToEdit . getTags ( ) ) ; return new Parcel ( updatedTrackingNumber , updatedName , updatedPhone , updatedEmail , updatedAddress , updatedDeliveryDate , updatedStatus , updatedTags ) ; }
Creates and returns a {@code Parcel} with the details of {@code parcelToEdit}
 edited with {@code editParcelDescriptor}.
Creates and returns a { @code Parcel } with the details of { @code parcelToEdit } edited with { @code editParcelDescriptor } .