code: public int indexOf(String word) {
          if (vocabulary.containsKey(word)) {
              return vocabulary.get(word).getHuffmanNode().getIdx();
          } else
              return -1;
      }
docs: This method returns index of word in sorted list.
  
  @param word
  @return