public List < T > getMostFrequentAll ( ) { List < T > ret = new ArrayList < T > ( ) ; int maxfreq = getMaximalFrequency ( ) ; for ( Map . Entry < T , Integer > entry : styles . entrySet ( ) ) { if ( entry . getValue ( ) == maxfreq ) ret . add ( entry . getKey ( ) ) ; } return ret ; }
Obtains the most frequent style or styles when multiple of them have the maximal frequency .