protected void appendToString ( StringBuilder sb , ValueCountingAnalyzerResult groupResult , int maxEntries ) { if ( maxEntries != 0 ) { Collection < ValueFrequency > valueCounts = groupResult . getValueCounts ( ) ; for ( ValueFrequency valueCount : valueCounts ) { sb . append ( "\n - " ) ; sb . append ( valueCount . getName ( ) ) ; sb . append ( ": " ) ; sb . append ( valueCount . getCount ( ) ) ; maxEntries -- ; if ( maxEntries == 0 ) { sb . append ( "\n ..." ) ; break ; } } } }
Appends a string representation with a maximum amount of entries