public Country unmarshalCountry(AddressDetails.Country src) { Country dest = new Country(); if (src.isSetAddressLine()) { for (AddressLineElement addressLine : src.getAddressLine()) dest.addAddressLine(unmarshalAddressLine(addressLine)); } if (src.isSetAdministrativeArea()) dest.setAdministrativeArea(unmarshalAdministrativeArea(src.getAdministrativeArea())); if (src.isSetCountryName()) { for (CountryNameElement countryName : src.getCountryName()) dest.addCountryName(unmarshalCountryName(countryName)); } if (src.isSetCountryNameCode()) { for (AddressDetails.Country.CountryNameCode countryNameCode : src.getCountryNameCode()) dest.addCountryNameCode(unmarshalCountryNameCode(countryNameCode)); } if (src.isSetLocality()) dest.setLocality(unmarshalLocality(src.getLocality())); if (src.isSetThoroughfare()) dest.setThoroughfare(unmarshalThoroughfare(src.getThoroughfare())); return dest; }