@ Deprecated private static ArrayList < FrequencyTableEntry > hashToFreqEntries ( HashMap < String , ArrayList < Integer > > hash ) { ArrayList < FrequencyTableEntry > res = new ArrayList < FrequencyTableEntry > ( ) ; for ( Entry < String , ArrayList < Integer > > e : hash . entrySet ( ) ) { char [ ] payload = e . getKey ( ) . toCharArray ( ) ; int frequency = e . getValue ( ) . size ( ) ; for ( Integer i : e . getValue ( ) ) { res . add ( new FrequencyTableEntry ( i , payload . clone ( ) , frequency ) ) ; } } return res ; }
Translates the hash table into sortable array of substrings .