/** * Returns the list of addresses that matches the specified type. Examples of address * type are: TO, CC, BCC, etc.. * * @param type Examples of address type are: TO, CC, BCC, etc. * @return the list of addresses that matches the specified type. */ public List<Address> getAddressesOfType(String type) { List<Address> answer = new ArrayList<Address>(addresses.size()); for (Iterator<Address> it = addresses.iterator(); it.hasNext();) { Address address = (Address) it.next(); if (address.getType().equals(type)) { answer.add(address); } } return answer; }
/** * Returns the list of addresses that matches the specified type. Examples of address * type are: TO, CC, BCC, etc.. * * @param type Examples of address type are: TO, CC, BCC, etc. * @return the list of addresses that matches the specified type. */ public List getAddressesOfType(String type) { List answer = new ArrayList(addresses.size()); for (Iterator it = addresses.iterator(); it.hasNext();) { Address address = (Address) it.next(); if (address.getType().equals(type)) { answer.add(address); } } return answer; }
/** * Returns the list of addresses that matches the specified type. Examples of address * type are: TO, CC, BCC, etc.. * * @param type Examples of address type are: TO, CC, BCC, etc. * @return the list of addresses that matches the specified type. */ public List getAddressesOfType(String type) { List answer = new ArrayList(addresses.size()); for (Iterator it = addresses.iterator(); it.hasNext();) { Address address = (Address) it.next(); if (address.getType().equals(type)) { answer.add(address); } } return answer; }
/** * Returns the list of addresses that matches the specified type. Examples of address * type are: TO, CC, BCC, etc.. * * @param type Examples of address type are: TO, CC, BCC, etc. * @return the list of addresses that matches the specified type. */ public List getAddressesOfType(String type) { List answer = new ArrayList(addresses.size()); for (Iterator it = addresses.iterator(); it.hasNext();) { Address address = (Address) it.next(); if (address.getType().equals(type)) { answer.add(address); } } return answer; }