Example usage for org.apache.commons.math.random RandomDataImpl nextSecureInt

List of usage examples for org.apache.commons.math.random RandomDataImpl nextSecureInt

Introduction

In this page you can find the example usage for org.apache.commons.math.random RandomDataImpl nextSecureInt.

Prototype

public int nextSecureInt(int lower, int upper) 

Source Link

Document

Generate a random int value uniformly distributed between lower and upper, inclusive.

Usage

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;
}