Package net.sf.saxon.option.exslt
Class Random
java.lang.Object
net.sf.saxon.option.exslt.Random
This class implements extension functions in the
http://exslt.org/random namespace.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic DoubleValue
Returns a single random number X between 0 and 1.static SequenceIterator
randomSequence
(int numberOfItems) Returns a sequence of random numbers between 0 and 1.static SequenceIterator
randomSequence
(int numberOfItems, double seed) Returns a sequence of random numbers between 0 and 1.
-
Constructor Details
-
Random
public Random()
-
-
Method Details
-
randomSequence
public static SequenceIterator randomSequence(int numberOfItems, double seed) throws IllegalArgumentException Returns a sequence of random numbers between 0 and 1.- Parameters:
numberOfItems
- number of random items in the sequence.seed
- the initial seed.- Returns:
- sequence of random numbers as an iterator.
- Throws:
IllegalArgumentException
-numberOfItems
is not positive.
-
randomSequence
Returns a sequence of random numbers between 0 and 1.- Parameters:
numberOfItems
- number of random items in the sequence.- Returns:
- sequence of random numbers.
- Throws:
IllegalArgumentException
-numberOfItems
is not positive.
-
randomSequence
Returns a single random number X between 0 and 1.- Returns:
- sequence random number.
- Throws:
XPathException
-