public List<T> getFrequentStyles(float factor, int maxfreq)
    {
        List<T> ret = new ArrayList<T>();
        for (Map.Entry<T, Integer> entry : styles.entrySet())
        {
            if (entry.getValue() >= factor * maxfreq)
                ret.add(entry.getKey());
        }
        return ret;
    }
public List < T > getFrequentStyles ( float factor , int maxfreq ) { List < T > ret = new ArrayList < T > ( ) ; for ( Map . Entry < T , Integer > entry : styles . entrySet ( ) ) { if ( entry . getValue ( ) >= factor * maxfreq ) ret . add ( entry . getKey ( ) ) ; } return ret ; }
Obtains the frequent style where the frequency is greater or equal than factor*max_frequency
where max_frequency may be specified arbitrarily.
@param factor the frequency factor
@param maxfreq the maximal frequency equal to factor 1.0
@return The list of frequent styles