Libraryless. Click here for Pure Java version (2638L/17K).
1 | static <A> Map<S, A> subMapWithKeysStartingWithIC(S prefix, Map<S, A> map) {
|
2 | if (empty(prefix) || empty(map)) ret map; |
3 | if (map instanceof NavigableMap && isCIMap(map)) {
|
4 | ret ((NavigableMap) map).subMap(prefix, true, lexicographicallyNextString(prefix), false); |
5 | } |
6 | ret filterKeys(swic$(prefix), map); |
7 | } |
Began life as a copy of #1013072
download show line numbers debug dex old transpilations
Travelled to 4 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, vouqrxazstgt
No comments. add comment
| Snippet ID: | #1030146 |
| Snippet name: | subMapWithKeysStartingWithIC |
| Eternal ID of this version: | #1030146/4 |
| Text MD5: | 52ae4fcc8dc9a43e2afb1414343c5d76 |
| Transpilation MD5: | 49973a9b1cb5e6cc057a5155a9783612 |
| Author: | stefan |
| Category: | javax |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2020-11-11 14:37:03 |
| Source code size: | 318 bytes / 7 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 473 / 624 |
| Version history: | 3 change(s) |
| Referenced in: | [show references] |