Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

11
LINES

< > BotCompany Repo | #1008335 // countryCodeToCommonName

JavaX fragment (include)

static SS countryCodeToCommonName_map;

static S countryCodeToCommonName(S code) {
  if (countryCodeToCommonName_map == null) synchronized(main.class) {
    countryCodeToCommonName_map = new HashMap;
    for (SS map : isoCountryData())
      countryCodeToCommonName_map.put(map.get("ISO 3166-1 2 Letter Code"), map.get("Common Name"));
  }
  code = toUpper(dropPrefix(".", code));
  ret countryCodeToCommonName_map.get(code);
}

download  show line numbers  debug dex  old transpilations   

Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1008335
Snippet name: countryCodeToCommonName
Eternal ID of this version: #1008335/2
Text MD5: cdc291585b4a16d08b7fa501e90d13a5
Author: stefan
Category: javax / a.i.
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-05-08 00:22:54
Source code size: 437 bytes / 11 lines
Pitched / IR pitched: No / No
Views / Downloads: 475 / 502
Version history: 1 change(s)
Referenced in: [show references]