Libraryless. Click here for Pure Java version (194L/3K).
static <A> TreeMap<S, A> asAlphaNumTreeMap(Map<S, A> map) { if (map cast TreeMap) if (map.comparator() == alphaNumComparator()) ret map; TreeMap<S, A> map2 = new TreeMap<S, A>(alphaNumComparator()); putAll(map2, map); ret map2; }
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: | 147 / 208 |
Version history: | 2 change(s) |
Referenced in: | [show references] |