code: public static WordResolver constructInstance(TreeSet<String> wordSet)
      {
          if (wordSet.size() > MAX_WORDS) {
              return null;
          }
          return new Builder(wordSet).construct();
      }
docs: Tries to construct an instance given ordered set of words.
  <p>
  Note: currently maximum number of words that can be contained
  is limited to {@link #MAX_WORDS}; additionally, maximum length
  of all such words can not exceed roughly 28000 characters.
  
  @return WordResolver constructed for given set of words, if
  the word set size is not too big; null to indicate "too big"
  instance.