Esempio n. 1
0
 public Set<String> getEmailAddresses() {
   if (!loadedAllEmails) {
     validEmails.addAll(realm.getEmailAddresses(this));
     loadedAllEmails = true;
   }
   return validEmails;
 }
Esempio n. 2
0
 public boolean hasEmailAddress(String email) {
   if (validEmails.contains(email)) {
     return true;
   } else if (invalidEmails != null && invalidEmails.contains(email)) {
     return false;
   } else if (realm.hasEmailAddress(this, email)) {
     validEmails.add(email);
     return true;
   } else if (invalidEmails == null) {
     invalidEmails = Sets.newTreeSet(String.CASE_INSENSITIVE_ORDER);
   }
   invalidEmails.add(email);
   return false;
 }