private Iterable<String> createIso3166Codes(Address address) { if (address== null) return ImmutableSet.<String> of(); final String country = nullToEmpty(address.getCountry()).trim(); if (country.isEmpty()) return ImmutableSet.<String> of(); final String state = nullToEmpty(address.getState()).trim(); if (state.isEmpty()) return ImmutableSet.<String> of(address.getCountry()); return ImmutableSet.<String> of("" + country + "-" + state); } }
private Iterable<String> createIso3166Codes(Address address) { if (address == null) return ImmutableSet.<String> of(); final String country = nullToEmpty(address.getCountry()).trim(); if (country.isEmpty()) return ImmutableSet.<String> of(); final String state = nullToEmpty(address.getState()).trim(); if (state.isEmpty()) return ImmutableSet.<String> of(address.getCountry()); return ImmutableSet.<String> of("" + country + "-" + state); } }
private Iterable<String> createIso3166Codes(Address address) { if (address== null) return ImmutableSet.<String> of(); final String country = nullToEmpty(address.getCountry()).trim(); if (country.isEmpty()) return ImmutableSet.<String> of(); final String state = nullToEmpty(address.getState()).trim(); if (state.isEmpty()) return ImmutableSet.<String> of(address.getCountry()); return ImmutableSet.<String> of("" + country + "-" + state); } }
private Iterable<String> createIso3166Codes(Address address) { if (address == null) return ImmutableSet.<String> of(); final String country = nullToEmpty(address.getCountry()).trim(); if (country.isEmpty()) return ImmutableSet.<String> of(); final String state = nullToEmpty(address.getState()).trim(); if (state.isEmpty()) return ImmutableSet.<String> of(address.getCountry()); return ImmutableSet.<String> of("" + country + "-" + state); } }
private Iterable<String> createIso3166Codes(Address address) { if (address== null) return ImmutableSet.<String> of(); final String country = nullToEmpty(address.getCountry()).trim(); if (country.isEmpty()) return ImmutableSet.<String> of(); final String state = nullToEmpty(address.getState()).trim(); if (state.isEmpty()) return ImmutableSet.<String> of(address.getCountry()); return ImmutableSet.<String> of("" + country + "-" + state); } }
private Iterable<String> createIso3166Codes(Address address) { if (address == null) return ImmutableSet.<String> of(); final String country = nullToEmpty(address.getCountry()).trim(); if (country.isEmpty()) return ImmutableSet.<String> of(); final String state = nullToEmpty(address.getState()).trim(); if (state.isEmpty()) return ImmutableSet.<String> of(address.getCountry()); return ImmutableSet.<String> of("" + country + "-" + state); } }
private void checkAddress(Address address) { assert address.getId() > 0 : address; assert address.getCountry() != null : address; if (!ImmutableSet.of("SG", "NL").contains(address.getCountry())) assert address.getState() != null : address; }
public T fromAddress(Address in) { return this .id(in.getId()) .country(in.getCountry()) .state(in.getState()) .description(in.getDescription()); } }
public T fromAddress(Address in) { return this .id(in.getId()) .country(in.getCountry()) .state(in.getState()) .description(in.getDescription()); } }
public T fromAddress(Address in) { return this .id(in.getId()) .country(in.getCountry()) .state(in.getState()) .description(in.getDescription()) .accountId(in.getAccountId()) .address(in.getAddress1()) .city(in.getCity()) .contactName(in.getContactName()) .isActive(in.isActive()) .locationId(in.getLocationId()) .postalCode(in.getPostalCode()); } }
public T fromAddress(Address in) { return this .id(in.getId()) .country(in.getCountry()) .state(in.getState()) .description(in.getDescription()) .accountId(in.getAccountId()) .address(in.getAddress1()) .city(in.getCity()) .contactName(in.getContactName()) .isActive(in.isActive()) .locationId(in.getLocationId()) .postalCode(in.getPostalCode()); } }
public T fromAddress(Address in) { return this .id(in.getId()) .country(in.getCountry()) .state(in.getState()) .description(in.getDescription()) .accountId(in.getAccountId()) .address(in.getAddress1()) .city(in.getCity()) .contactName(in.getContactName()) .isActive(in.isActive()) .locationId(in.getLocationId()) .postalCode(in.getPostalCode()); } }
public T fromAddress(Address in) { return this .id(in.getId()) .country(in.getCountry()) .state(in.getState()) .description(in.getDescription()) .accountId(in.getAccountId()) .address(in.getAddress1()) .city(in.getCity()) .contactName(in.getContactName()) .isActive(in.isActive()) .locationId(in.getLocationId()) .postalCode(in.getPostalCode()); } }