src/main/java/seedu/planner/model/ModelManager.java
private void addActivityMapping(Activity act) {
        if (act.getContact().isPresent()) {
            Contact contact = act.getContact().get();
            if (!hasContact(contact)) {
                addContact(contact);
            }
            contactActivityMap.put(contact, act);
        }
    }
/**
     * Creates a mapping between an {@code Activity} and it's {@code Contact}, if it possesses one.
     */
Creates a mapping between an  Activity and it's  Contact, if it possesses one.
Creates a mapping between an Activity and it ' s Contact if it possesses one .
private void addActivityMapping(Activity act) {
        if (act.getContact().isPresent()) {
            Contact contact = act.getContact().get();
            if (!hasContact(contact)) {
                addContact(contact);
            }
            contactActivityMap.put(contact, act);
        }
    }
private void addActivityMapping ( Activity act ) { if ( act . getContact ( ) . isPresent ( ) ) { Contact contact = act . getContact ( ) . get ( ) ; if ( ! hasContact ( contact ) ) { addContact ( contact ) ; } contactActivityMap . put ( contact , act ) ; } }
Creates a mapping between an {@code Activity} and it's {@code Contact}, if it possesses one.
Creates a mapping between an { @code Activity } and it ' s { @code Contact } if it possesses one .