public static List < String > getWords ( int count , boolean startLorem ) { LinkedList < String > wordList = new LinkedList < String > ( ) ; if ( startLorem ) { if ( count > COMMON_WORDS . length ) { wordList . addAll ( Arrays . asList ( COMMON_WORDS ) ) ; } else { // add first "count" words for ( int i = 0 ; i < count ; i ++ ) { wordList . add ( COMMON_WORDS [ i ] ) ; } } } // add remaining words (random) for ( int i = wordList . size ( ) ; i < count ; i ++ ) { wordList . add ( QuickUtils . math . getRandomPosition ( DICTIONARY ) ) ; } return wordList ; }
Returns a list of words .