Class RandomNumberGenerator

All Implemented Interfaces:
Callable, Function, GroundedValue, Item, Sequence

public class RandomNumberGenerator extends SystemFunction implements Callable
This class implements the function random-number-generator(), which is a standard function in XPath 3.1
  • Field Details

    • RETURN_TYPE

      public static final MapType RETURN_TYPE
  • Constructor Details

    • RandomNumberGenerator

      public RandomNumberGenerator()
  • Method Details

    • call

      public Sequence call(XPathContext context, Sequence[] arguments) throws XPathException
      Description copied from interface: Function
      Invoke the function
      Specified by:
      call in interface Callable
      Specified by:
      call in interface Function
      Parameters:
      context - the XPath dynamic evaluation context
      arguments - the actual arguments to be supplied
      Returns:
      the result of invoking the function
      Throws:
      XPathException - if a dynamic error occurs within the function