private void addItem(String nextWord, StatusDataItems items) throws DecodingException { // All the matching must be done in a case-insensitive fashion. // See rfc3501 9. Formal Syntax and IMAP-282 if (nextWord.equalsIgnoreCase(ImapConstants.STATUS_MESSAGES)) { items.setMessages(true); } else if (nextWord.equalsIgnoreCase(ImapConstants.STATUS_RECENT)) { items.setRecent(true); } else if (nextWord.equalsIgnoreCase(ImapConstants.STATUS_UIDNEXT)) { items.setUidNext(true); } else if (nextWord.equalsIgnoreCase(ImapConstants.STATUS_UIDVALIDITY)) { items.setUidValidity(true); } else if (nextWord.equalsIgnoreCase(ImapConstants.STATUS_UNSEEN)) { items.setUnseen(true); } else if (nextWord.equalsIgnoreCase(ImapConstants.STATUS_HIGHESTMODSEQ)) { // HIGHESTMODSEQ status item as defined in RFC4551 3.6 HIGHESTMODSEQ Status Data Items items.setHighestModSeq(true); } else { throw new DecodingException(HumanReadableText.ILLEGAL_ARGUMENTS, "Unknown status item: '" + nextWord + "'"); } }
private void addItem(String nextWord, StatusDataItems items) throws DecodingException { // All the matching must be done in a case-insensitive fashion. // See rfc3501 9. Formal Syntax and IMAP-282 if (nextWord.equalsIgnoreCase(ImapConstants.STATUS_MESSAGES)) { items.setMessages(true); } else if (nextWord.equalsIgnoreCase(ImapConstants.STATUS_RECENT)) { items.setRecent(true); } else if (nextWord.equalsIgnoreCase(ImapConstants.STATUS_UIDNEXT)) { items.setUidNext(true); } else if (nextWord.equalsIgnoreCase(ImapConstants.STATUS_UIDVALIDITY)) { items.setUidValidity(true); } else if (nextWord.equalsIgnoreCase(ImapConstants.STATUS_UNSEEN)) { items.setUnseen(true); } else if (nextWord.equalsIgnoreCase(ImapConstants.STATUS_HIGHESTMODSEQ)) { // HIGHESTMODSEQ status item as defined in RFC4551 3.6 HIGHESTMODSEQ Status Data Items items.setHighestModSeq(true); } else { throw new DecodingException(HumanReadableText.ILLEGAL_ARGUMENTS, "Unknown status item: '" + nextWord + "'"); } }