src/main/java/seedu/planner/model/ModelManager.java
private void removeContactMapping(Contact contact) {
        if (contactActivityMap.containsKey(contact)) {
            Activity act = contactActivityMap.remove(contact);

            Activity newAct = new Activity(act.getName(), act.getAddress(), null,
                    act.getCost().isPresent() ? act.getCost().get() : null, act.getTags(), act.getDuration(),
                    act.getPriority());
            this.activities.setActivity(act, newAct);
        }

        if (contactAccommodationMap.containsKey(contact)) {
            Accommodation acc = contactAccommodationMap.remove(contact);
            Accommodation newAcc = new Accommodation(acc.getName(), acc.getAddress(), null, acc.getTags());
            this.accommodations.setAccommodation(acc, newAcc);
        }
    }
/**
     * Removes the mapping of a {@code Contact} and it's related {@code Activity} and {@code Accommodation}.
     */
Removes the mapping of a  Contact and it's related  Activity and  Accommodation.
Removes the mapping of a Contact and it ' s related Activity and Accommodation .
private void removeContactMapping(Contact contact) {
        if (contactActivityMap.containsKey(contact)) {
            Activity act = contactActivityMap.remove(contact);
            Activity newAct = new Activity(act.getName(), act.getAddress(), null,
                    act.getCost().isPresent() ? act.getCost().get() : null, act.getTags(), act.getDuration(),
                    act.getPriority());
            this.activities.setActivity(act, newAct);
        }
        if (contactAccommodationMap.containsKey(contact)) {
            Accommodation acc = contactAccommodationMap.remove(contact);
            Accommodation newAcc = new Accommodation(acc.getName(), acc.getAddress(), null, acc.getTags());
            this.accommodations.setAccommodation(acc, newAcc);
        }
    }
private void removeContactMapping ( Contact contact ) { if ( contactActivityMap . containsKey ( contact ) ) { Activity act = contactActivityMap . remove ( contact ) ; Activity newAct = new Activity ( act . getName ( ) , act . getAddress ( ) , null , act . getCost ( ) . isPresent ( ) ? act . getCost ( ) . get ( ) : null , act . getTags ( ) , act . getDuration ( ) , act . getPriority ( ) ) ; this . activities . setActivity ( act , newAct ) ; } if ( contactAccommodationMap . containsKey ( contact ) ) { Accommodation acc = contactAccommodationMap . remove ( contact ) ; Accommodation newAcc = new Accommodation ( acc . getName ( ) , acc . getAddress ( ) , null , acc . getTags ( ) ) ; this . accommodations . setAccommodation ( acc , newAcc ) ; } }
Removes the mapping of a {@code Contact} and it's related {@code Activity} and {@code Accommodation}.
Removes the mapping of a { @code Contact } and it ' s related { @code Activity } and { @code Accommodation } .