List of usage examples for org.apache.commons.math.random RandomDataImpl nextSecureInt
public int nextSecureInt(int lower, int upper)
lower
and upper
, inclusive. From source file:org.qnot.passtab.TabulaRecta.java
private String[] generateRow(int rowIndex, RandomDataImpl rand) { String[] row = new String[this.headerAlphabet.size()]; for (int i = 0; i < this.headerAlphabet.size(); i++) { int index = rand.nextSecureInt(0, (this.dataAlphabet.size() - 1)); row[i] = this.dataAlphabet.get(index); }/*from w ww.j a v a 2 s.co m*/ return row; }