コード例 #1
0
 public void add(String regionCode) {
   CountryCode cc = new CountryCode();
   cc.regionCode = regionCode;
   cc.countryCode = PhoneNumberUtil.getInstance().getCountryCodeForRegion(regionCode);
   cc.regionName = NumberValidator.getRegionDisplayName(regionCode, Locale.getDefault());
   mData.add(cc);
 }
コード例 #2
0
 /**
  * Sets the value of the countryCode property.
  *
  * @param value allowed object is {@link CountryCode }
  */
 @Override
 public void setCountryCode(ICountryCode value) {
   if (value instanceof CountryCode) {
     this.countryCode = (CountryCode) value;
   } else {
     this.countryCode = CountryCode.fromValue(value.value());
   }
 }
コード例 #3
0
ファイル: CountryCodeAdapter.java プロジェクト: peletomi/vax
 @Override
 public CountryCode unmarshal(final String code) throws Exception {
   CountryCode result = null;
   if (code != null) {
     result = CountryCode.valueOf(code.toUpperCase());
   }
   return result;
 }
コード例 #4
0
ファイル: CountryCodeAdapter.java プロジェクト: peletomi/vax
 @Override
 public String marshal(final CountryCode code) throws Exception {
   String result = null;
   if (code != null) {
     result = code.name().toLowerCase();
   }
   return result;
 }