src/main/java/codeu/model/store/basic/ProfileStore.java
/** Add a new profile to the current set of profiles known to the application. */
Add a new profile to the current set of profiles known to the application.
Add a new profile to the current set of profiles known to the application .
public void addProfile(Profile profile) {
    UUID id = profile.getId();
    for (Profile curProfile : profiles) {
      if (curProfile.getId().equals(id)) {
        curProfile = profile;
        persistentStorageAgent.writeThrough(profile);
        return;
      }
    }
    profiles.add(profile);
    persistentStorageAgent.writeThrough(profile);
  }
public void addProfile ( Profile profile ) { UUID id = profile . getId ( ) ; for ( Profile curProfile : profiles ) { if ( curProfile . getId ( ) . equals ( id ) ) { curProfile = profile ; persistentStorageAgent . writeThrough ( profile ) ; return ; } } profiles . add ( profile ) ; persistentStorageAgent . writeThrough ( profile ) ; }
Add a new profile to the current set of profiles known to the application.
Add a new profile to the current set of profiles known to the application .
// Replaces current profile if present //        Profile oldProfile = null; //        for (Profile curProfile : profiles) { //            if (curProfile.getId().equals(id)) { //                oldProfile = curProfile; //            } //        } //        if(oldProfile != null){ //            profiles.remove(oldProfile); //        }