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

13
LINES

< > BotCompany Repo | #1019489 // sortedByMapElement_alphaNum

JavaX fragment (include)

static L<Map> sortedByMapElement_alphaNum(Collection<Map> c, final S key) {
  L<Map> l = new ArrayList(c);
  sort(l, new Comparator<Map>() {
    public int compare(Map a, Map b) {
      ret cmpAlphaNum(strOrNull(a.get(key)), strOrNull(b.get(key));
    }
  });
  ret l;
}

static L<Map> sortedByMapElement_alphaNum(S key, Collection<Map> c) {
  ret sortedByMapElement_alphaNum(c, key);
}

Author comment

Began life as a copy of #1010437

download  show line numbers  debug dex  old transpilations   

Travelled to 12 computer(s): bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1019489
Snippet name: sortedByMapElement_alphaNum
Eternal ID of this version: #1019489/4
Text MD5: 852e8b1c097f131f87cdde6c496b321d
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-12-19 16:31:50
Source code size: 394 bytes / 13 lines
Pitched / IR pitched: No / No
Views / Downloads: 180 / 234
Version history: 3 change(s)
Referenced in: [show references]