Beispiel #1
0
  // allow moving directly to next message
  public Mail getNextUnreadMail() {
    for (final Mail m : mailbox) {
      if (m.isUnread()) {
        return m;
      }
    }

    return null;
  }
Beispiel #2
0
 public int numUnreadMessages() {
   int num = 0;
   for (final Mail m : mailbox) {
     if (m.isUnread()) {
       num++;
     }
   }
   return num;
 }