Libraryless. Click here for Pure Java version (104L/1K).
static <A, B> TreeMap<A, B> asRevTreeMap(Map<A, B> map) { Comparator<A> comparator = reverseComparator(); if (isTreeMapWithComparator(map, comparator)) ret (TreeMap) map; var m2 = new TreeMap(comparator); m2.putAll(map); ret m2; }
Began life as a copy of #1005222
download show line numbers debug dex old transpilations
Travelled to 2 computer(s): mqqgnosmbjvj, wnsclhtenguj
No comments. add comment
Snippet ID: | #1037246 |
Snippet name: | asRevTreeMap |
Eternal ID of this version: | #1037246/4 |
Text MD5: | 7889dbb39fd05af1cdfd62568fb51aa5 |
Transpilation MD5: | 3cdb58bd9ce70c8dd5e7fd352c5b09dc |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2023-08-26 02:03:35 |
Source code size: | 251 bytes / 8 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 137 / 202 |
Version history: | 3 change(s) |
Referenced in: | -