question: public KeyValueNode < String , Integer > findWord ( String aWord ) { aWord = aWord . toLowerCase ( ) ; KeyValueNode < String , Integer > parent = root ; int depth = 1 ; while ( parent . hasChildren ( ) ) { String w = aWord . substring ( 0 , depth ) ; KeyValueNode < String , Integer > child = parent . getChild ( w ) ; if ( w . equals ( aWord ) ) { return child ; } else if ( child != null ) { parent = child ; depth ++ ; } else { return null ; } } return null ; }
target:  Finds a node with a given string. If not found NULL is returned.