Class RandomDouble

  • All Implemented Interfaces:
    IVilType

    public class RandomDouble
    extends java.lang.Object
    implements IVilType
    A random "instantiator" for VIL.
    Author:
    Holger Eichelberger
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private static boolean tests  
    • Constructor Summary

      Constructors 
      Constructor Description
      RandomDouble()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      (package private) static boolean isInTests()
      Returns whether we are in test mode.
      static double random()
      Returns a random double number.
      static boolean setInTests​(boolean inTests)
      Allows to set the test flag.
      • Methods inherited from class java.lang.Object

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

      • tests

        private static boolean tests
    • Constructor Detail

      • RandomDouble

        public RandomDouble()
    • Method Detail

      • setInTests

        public static boolean setInTests​(boolean inTests)
        Allows to set the test flag.
        Parameters:
        inTests - whether we are running tests and constant numbers shall be returned
        Returns:
        the value before setting the flag
      • isInTests

        static boolean isInTests()
        Returns whether we are in test mode.
        Returns:
        whether we are running tests and constant numbers shall be returned
      • random

        public static double random()
        Returns a random double number.
        Returns:
        a random double number