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


< > BotCompany Repo | #1007624 - orderMapByValue

JavaX fragment (include)

static <A, B> LinkedHashMap<A, B> orderMapByValue(final Map<A, B> map) {
  L<A> l = new ArrayList(map.keySet());
  sort(l, mapComparator(map));
  LinkedHashMap<A, B> map2 = litorderedmap();
  for (A a : l)
    map2.put(a, map.get(a));
  ret map2;

Author comment

Began life as a copy of #1004896

download  show line numbers  debug dex   

Travelled to 12 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, xrpafgyirdlv

No comments. add comment

Snippet ID: #1007624
Snippet name: orderMapByValue
Eternal ID of this version: #1007624/3
Text MD5: d9edd1a37be8c78e2cf77e88fd20ef82
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-04-17 15:57:28
Source code size: 255 bytes / 8 lines
Pitched / IR pitched: No / No
Views / Downloads: 288 / 278
Version history: 2 change(s)
Referenced in: [show references]

Formerly at &