コード例 #1
0
 private boolean isValuePartOfAddressList(List<Address> list, String formated) {
   if (list != null) {
     for (Address actAttribute : list) {
       if (actAttribute.getFormatted().equals(formated)) {
         return true;
       }
     }
   }
   return false;
 }
コード例 #2
0
 private Address getAddress(List<Address> addresses, String formatted) {
   Address returnAddress = null;
   if (addresses != null) {
     for (Address actAddress : addresses) {
       if (actAddress.getFormatted().equals(formatted)) {
         returnAddress = actAddress;
         break;
       }
     }
   }
   if (returnAddress == null) {
     fail("The address with the formatted part of " + formatted + " could not be found");
   }
   return returnAddress;
 }