Libraryless. Click here for Pure Java version (194L/3K).
1 | static <A> TreeMap<S, A> asAlphaNumTreeMap(Map<S, A> map) { |
2 | if (map cast TreeMap) |
3 | if (map.comparator() == alphaNumComparator()) |
4 | ret map; |
5 | TreeMap<S, A> map2 = new TreeMap<S, A>(alphaNumComparator()); |
6 | putAll(map2, map); |
7 | ret map2; |
8 | } |
download show line numbers debug dex old transpilations
Travelled to 4 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, vouqrxazstgt
No comments. add comment
Snippet ID: | #1031491 |
Snippet name: | asAlphaNumTreeMap |
Eternal ID of this version: | #1031491/3 |
Text MD5: | 1d029cab4d287868cc71bd95c5399ce5 |
Transpilation MD5: | bcbdd4b70c20544bbf799e90578e9635 |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2021-06-15 16:18:15 |
Source code size: | 254 bytes / 8 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 148 / 210 |
Version history: | 2 change(s) |
Referenced in: | [show references] |