code: public boolean contains(String[] words) {
      if (words.length == 1) {
        return wordMap.contains(words[0]);
      }
      else {
        NGram ngram = nGramFactory.createNGram(words);
        if (ngram == null) {
          return false;
        }
        else {
          return gramSet.contains(ngram);
        }
      }
    }
docs: Returns true if this dictionary contains the n-gram consisting of the specified words.
  @param words The words which make up the n-gram to look up in the dictionary.
  @return true if this dictionary contains the specified n-gram; false otherwise.