I think a word tree is a Map where the values are more word trees or any kind of non-Map (=leaf). The keys are words or "" to mix a leaf and a non-leaf.