Class Rand.UniformRand

  • All Implemented Interfaces:
    Rand
    Enclosing interface:
    Rand

    public static class Rand.UniformRand
    extends java.lang.Object
    implements Rand
    uniform distribution of [0,x).
    • Nested Class Summary

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private int max  
      private java.util.Random rand  
    • Constructor Summary

      Constructors 
      Constructor Description
      UniformRand​(java.util.Random rand, int max)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int next()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • rand

        private final java.util.Random rand
      • max

        private int max
    • Constructor Detail

      • UniformRand

        public UniformRand​(java.util.Random rand,
                           int max)
    • Method Detail

      • next

        public int next()
        Specified by:
        next in interface Rand