Libraryless. Click here for Pure Java version (2880L/18K).
1 | // returns case-insensitive trie iff map is case-insensitive |
2 | static <A> StringTrie<A> asStringTrie(Map<S, A> map) {
|
3 | new StringTrie<A> trie; |
4 | if (isCIMap(map)) trie.makeCaseInsensitive(); |
5 | if (map != null) |
6 | for (Map.Entry<S, A> e : map.entrySet()) |
7 | trie.add(e.getKey(), e.getValue()); |
8 | ret trie; |
9 | } |
download show line numbers debug dex old transpilations
Travelled to 4 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, vouqrxazstgt
No comments. add comment
| Snippet ID: | #1030154 |
| Snippet name: | asStringTrie |
| Eternal ID of this version: | #1030154/1 |
| Text MD5: | 613f7f26332e356f0b1a95a5ac1cf4a4 |
| Transpilation MD5: | f226a3d3a8fbdf2513cd96651db88561 |
| Author: | stefan |
| Category: | javax |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2020-11-11 20:51:54 |
| Source code size: | 317 bytes / 9 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 482 / 573 |
| Referenced in: | [show references] |