Package dap4.servlet

Class RandomValue


  • public class RandomValue
    extends Value
    • Field Detail

      • random

        protected Random random
    • Constructor Detail

      • RandomValue

        public RandomValue()
    • Method Detail

      • nextValue

        public Object nextValue​(dap4.core.dmr.DapType basetype)
                         throws dap4.core.util.DapException
        Specified by:
        nextValue in class Value
        Throws:
        dap4.core.util.DapException
      • nextInteger

        public Object nextInteger​(dap4.core.dmr.DapType basetype)
                           throws dap4.core.util.DapException
        Throws:
        dap4.core.util.DapException
      • nextFloat

        public Object nextFloat​(dap4.core.dmr.DapType basetype)
                         throws dap4.core.util.DapException
        Throws:
        dap4.core.util.DapException
      • nextCount

        public int nextCount​(int max)
                      throws dap4.core.util.DapException
        Return an integer in range 1..max inclusive.
        Specified by:
        nextCount in class Value
        Parameters:
        max -
        Returns:
        random integer in range
        Throws:
        dap4.core.util.DapException