code: protected static String[] toIndexedStringArray(TObjectIntHashMap labelToIndexMap) {
        final String[] array = new String[labelToIndexMap.size()];
        labelToIndexMap.forEachEntry(new TObjectIntProcedure() {
                public boolean execute(Object str, int index) {
                    array[index] = (String)str;
                    return true;
                }
            });
        return array;
    }
docs: Utility method for creating a String[] array from a map whose
  keys are labels (Strings) to be stored in the array and whose
  values are the indices (Integers) at which the corresponding
  labels should be inserted.
  
  @param labelToIndexMap a <code>TObjectIntHashMap</code> value
  @return a <code>String[]</code> value
  @since maxent 1.2.6