svoid wordTreeAdd(Map tree, S value, L words) { for (S word : words) { O child = tree.get(word); Map subTree; if (child instanceof Map) subTree = child; else { tree.put(word, subTree = ciMap()); if (child != null) subTree.put("", child); tree = subTree; } } tree.put("", value); }