public Recipients getRecipients() throws RecipientFormattingException { String rawText = recipientsText.getText().toString(); Recipients recipients = RecipientFactory.getRecipientsFromString(getContext(), rawText, false); if (recipients.isEmpty()) throw new RecipientFormattingException("Recipient List Is Empty!"); return recipients; }
public void addRecipients(Recipients recipients) { List<Recipient> recipientList = recipients.getRecipientsList(); Iterator<Recipient> iterator = recipientList.iterator(); while (iterator.hasNext()) { Recipient recipient = iterator.next(); addRecipient(recipient.getName(), recipient.getNumber()); } }