megamek.common
Class MMRandom.SunRandom

java.lang.Object
  extended by megamek.common.MMRandom
      extended by megamek.common.MMRandom.SunRandom
Direct Known Subclasses:
MMRandom.Pool36Random
Enclosing class:
MMRandom

static class MMRandom.SunRandom
extends MMRandom

Uses com.sun.java.util.collections.Random


Nested Class Summary
 
Nested classes/interfaces inherited from class megamek.common.MMRandom
MMRandom.CryptoRandom, MMRandom.Pool36Random, MMRandom.SunRandom
 
Field Summary
(package private)  java.util.Random random
           
 
Fields inherited from class megamek.common.MMRandom
R_CRYPTO, R_DEFAULT, R_POOL36, R_SUN
 
Constructor Summary
MMRandom.SunRandom()
           
 
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

random

java.util.Random random
Constructor Detail

MMRandom.SunRandom

MMRandom.SunRandom()
Method Detail

randomInt

public int randomInt(int maxValue)
Description copied from class: MMRandom
Returns a random int in the range from 0 to one less than the supplied max value.

Specified by:
randomInt in class MMRandom
Parameters:
maxValue - - the smallest int value which will exceed any random number returned by this method.
Returns:
a random int from the value set [0, maxValue).