code: public void applyIndexes(VocabCache<? extends SequenceElement> cache) {
          if (!buildTrigger)
              build();
  
          for (int a = 0; a < words.size(); a++) {
              if (words.get(a).getLabel() != null) {
                  cache.addWordToIndex(a, words.get(a).getLabel());
              } else {
                  cache.addWordToIndex(a, words.get(a).getStorageId());
              }
  
              words.get(a).setIndex(a);
          }
      }
docs: This method updates VocabCache and all it's elements with Huffman indexes
  Please note: it should be the same VocabCache as was used for Huffman tree initialization
  
  @param cache VocabCache to be updated.