src/main/java/seedu/address/storage/XmlAdaptedParcel.java
public Parcel toModelType() throws IllegalValueException {
        final List<Tag> parcelTags = new ArrayList<>();
        for (XmlAdaptedTag tag : tagged) {
            parcelTags.add(tag.toModelType());
        }
        final TrackingNumber trackingNumber = new TrackingNumber(this.trackingNumber);
        final Name name = new Name(this.name);
        final Phone phone = new Phone(this.phone);
        final Email email = new Email(this.email);
        final Address address = new Address(this.address);
        final DeliveryDate deliveryDate = new DeliveryDate(this.deliveryDate);
        final Status status = Status.getInstance(this.status);
        final Set<Tag> tags = new HashSet<>(parcelTags);
        return new Parcel(trackingNumber, name, phone, email, address, deliveryDate, status, tags);
    }
/**
     * Converts this jaxb-friendly adapted parcel object into the model's Parcel object.
     * @throws IllegalValueException if there were any data constraints violated in the adapted parcel
     */
Converts this jaxb-friendly adapted parcel object into the model's Parcel object.
@throws IllegalValueException if there were any data constraints violated in the adapted parcel
Converts this jaxb - friendly adapted parcel object into the model ' s Parcel object . @throws IllegalValueException if there were any data constraints violated in the adapted parcel
public Parcel toModelType() throws IllegalValueException {
        final List<Tag> parcelTags = new ArrayList<>();
        for (XmlAdaptedTag tag : tagged) {
            parcelTags.add(tag.toModelType());
        }
        final TrackingNumber trackingNumber = new TrackingNumber(this.trackingNumber);
        final Name name = new Name(this.name);
        final Phone phone = new Phone(this.phone);
        final Email email = new Email(this.email);
        final Address address = new Address(this.address);
        final DeliveryDate deliveryDate = new DeliveryDate(this.deliveryDate);
        final Status status = Status.getInstance(this.status);
        final Set<Tag> tags = new HashSet<>(parcelTags);
        return new Parcel(trackingNumber, name, phone, email, address, deliveryDate, status, tags);
    }
public Parcel toModelType ( ) throws IllegalValueException { final List < Tag > parcelTags = new ArrayList < > ( ) ; for ( XmlAdaptedTag tag : tagged ) { parcelTags . add ( tag . toModelType ( ) ) ; } final TrackingNumber trackingNumber = new TrackingNumber ( this . trackingNumber ) ; final Name name = new Name ( this . name ) ; final Phone phone = new Phone ( this . phone ) ; final Email email = new Email ( this . email ) ; final Address address = new Address ( this . address ) ; final DeliveryDate deliveryDate = new DeliveryDate ( this . deliveryDate ) ; final Status status = Status . getInstance ( this . status ) ; final Set < Tag > tags = new HashSet < > ( parcelTags ) ; return new Parcel ( trackingNumber , name , phone , email , address , deliveryDate , status , tags ) ; }
Converts this jaxb-friendly adapted parcel object into the model's Parcel object.
Converts this jaxb - friendly adapted parcel object into the model ' s Parcel object .