public static SimpleStringTrie from ( Map < String , ? > map ) { SimpleStringTrie st = new SimpleStringTrie ( ) ; map . keySet ( ) . forEach ( key -> st . add ( key ) ) ; return st ; }
Useful if you want to build a trie for an existing map so you can figure out a matching prefix that has an entry