Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

9
LINES

< > BotCompany Repo | #1030154 // asStringTrie

JavaX fragment (include) [tags: use-pretranspiled]

Libraryless. Click here for Pure Java version (2880L/18K).

// returns case-insensitive trie iff map is case-insensitive
static <A> StringTrie<A> asStringTrie(Map<S, A> map) {
  new StringTrie<A> trie;
  if (isCIMap(map)) trie.makeCaseInsensitive();
  if (map != null)
    for (Map.Entry<S, A> e : map.entrySet())
      trie.add(e.getKey(), e.getValue());
  ret trie;
}

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: 155 / 199
Referenced in: [show references]