Class RandomService


  • public class RandomService
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      RandomService()
      Uses a default shared random.
      RandomService​(java.util.Random random)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String hex()  
      java.lang.String hex​(int length)  
      java.lang.Boolean nextBoolean()  
      double nextDouble()  
      int nextInt​(int n)  
      java.lang.Integer nextInt​(int min, int max)  
      long nextLong()  
      long nextLong​(long n)  
      • Methods inherited from class java.lang.Object

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

      • RandomService

        public RandomService()
        Uses a default shared random.
      • RandomService

        public RandomService​(java.util.Random random)
        Parameters:
        random - If null is passed in, a default Random is assigned
    • Method Detail

      • nextInt

        public int nextInt​(int n)
      • nextLong

        public long nextLong()
      • nextLong

        public long nextLong​(long n)
      • nextDouble

        public double nextDouble()
      • nextBoolean

        public java.lang.Boolean nextBoolean()
      • nextInt

        public java.lang.Integer nextInt​(int min,
                                         int max)
      • hex

        public java.lang.String hex()
      • hex

        public java.lang.String hex​(int length)