Libraryless. Click here for Pure Java version (31L/1K).
1  | static <A, B> TreeMap<A, B> asTreeMapWithDefaultComparator(Map<A, B> map) {
 | 
2  | if (map cast TreeMap)  | 
3  | if (map.comparator() == null)  | 
4  | ret map;  | 
5  | ret map == null ? new TreeMap : new TreeMap(map);  | 
6  | }  | 
Began life as a copy of #1005222
download show line numbers debug dex old transpilations
Travelled to 4 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, vouqrxazstgt
No comments. add comment
| Snippet ID: | #1031660 | 
| Snippet name: | asTreeMapWithDefaultComparator | 
| Eternal ID of this version: | #1031660/2 | 
| Text MD5: | e96ec524c62e280aa240ec3e98fc687e | 
| Transpilation MD5: | 435a7969c258f013f95e525ad1748533 | 
| Author: | stefan | 
| Category: | javax | 
| Type: | JavaX fragment (include) | 
| Public (visible to everyone): | Yes | 
| Archived (hidden from active list): | No | 
| Created/modified: | 2021-06-25 07:24:17 | 
| Source code size: | 207 bytes / 6 lines | 
| Pitched / IR pitched: | No / No | 
| Views / Downloads: | 341 / 457 | 
| Version history: | 1 change(s) | 
| Referenced in: | [show references] |