// allow moving directly to next message public Mail getNextUnreadMail() { for (final Mail m : mailbox) { if (m.isUnread()) { return m; } } return null; }
public int numUnreadMessages() { int num = 0; for (final Mail m : mailbox) { if (m.isUnread()) { num++; } } return num; }