|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectmegamek.common.MMRandom
megamek.common.MMRandom.CryptoRandom
static class MMRandom.CryptoRandom
Uses java.security.SecureRandom
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class megamek.common.MMRandom |
|---|
MMRandom.CryptoRandom, MMRandom.Pool36Random, MMRandom.SunRandom |
| Field Summary | |
|---|---|
(package private) java.security.SecureRandom |
random
|
| Fields inherited from class megamek.common.MMRandom |
|---|
R_CRYPTO, R_DEFAULT, R_POOL36, R_SUN |
| Constructor Summary | |
|---|---|
MMRandom.CryptoRandom()
Contruct, making a new thread to init the RNG |
|
| Method Summary | |
|---|---|
int |
randomInt(int maxValue)
Returns a random int in the range from 0 to one less than
the supplied max value. |
| Methods inherited from class megamek.common.MMRandom |
|---|
d6, d6, generate |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
java.security.SecureRandom random
| Constructor Detail |
|---|
public MMRandom.CryptoRandom()
throws java.lang.NoSuchMethodException
java.lang.NoSuchMethodException| Method Detail |
|---|
public int randomInt(int maxValue)
MMRandomint in the range from 0 to one less than
the supplied max value.
randomInt in class MMRandommaxValue - - the smallest int value which will exceed
any random number returned by this method.
int from the value set [0, maxValue).
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||