예제 #1
0
 public String randomString(int charsCount) {
   StringBuilder sb = new StringBuilder(charsCount);
   for (int i = 0; i < charsCount; i++) {
     sb.append(alphabet.charAt(baseProducer.randomInt(maxAlphabetIndex)));
   }
   return sb.toString();
 }
예제 #2
0
 private List<String> readRawWords(List<String> words, int count, int precision) {
   return baseProducer.randomElements(words, baseProducer.randomBetween(count, count + precision));
 }