public static Trie < String > toStringTrie ( List < String > words ) { final TrieBuilder < String > builder = new TrieBuilder <> ( ) ; for ( String word : words ) { builder . add ( word , "" ) ; } return builder . build ( ) ; }
Sometimes a Trie s values aren t important only the words matter . Convenience method that associates each word with an empty value .