/** Initializes all search strings for this <tt>MetaUIGroup</tt>. */ private void initSearchStrings() { searchStrings.add(metaContact.getDisplayName()); Iterator<Contact> contacts = metaContact.getContacts(); while (contacts.hasNext()) { Contact contact = contacts.next(); searchStrings.add(contact.getDisplayName()); searchStrings.add(contact.getAddress()); } }
/** * Returns a list of all <tt>UIContactDetail</tt>s within this <tt>UIContact</tt>. * * @return a list of all <tt>UIContactDetail</tt>s within this <tt>UIContact</tt> */ public List<UIContactDetail> getContactDetails() { List<UIContactDetail> resultList = new LinkedList<UIContactDetail>(); Iterator<Contact> contacts = metaContact.getContacts(); while (contacts.hasNext()) { resultList.add(new MetaContactDetail(contacts.next())); } return resultList; }
/** * Returns a list of <tt>UIContactDetail</tt>s supporting the given <tt>OperationSet</tt> class. * * @param opSetClass the <tt>OperationSet</tt> class we're interested in * @return a list of <tt>UIContactDetail</tt>s supporting the given <tt>OperationSet</tt> class */ public List<UIContactDetail> getContactDetailsForOperationSet( Class<? extends OperationSet> opSetClass) { List<UIContactDetail> resultList = new LinkedList<UIContactDetail>(); Iterator<Contact> contacts = metaContact.getContactsForOperationSet(opSetClass).iterator(); while (contacts.hasNext()) { resultList.add(new MetaContactDetail(contacts.next())); } return resultList; }