Random.From(IRandomGenerator) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Returns an instance of Random that delegates method calls to the RandomGenerator argument.
[Android.Runtime.Register("from", "(Ljava/util/random/RandomGenerator;)Ljava/util/Random;", "", ApiSince=36)]
public static Java.Util.Random? From(Java.Util.RandomGenerators.IRandomGenerator? generator);
[<Android.Runtime.Register("from", "(Ljava/util/random/RandomGenerator;)Ljava/util/Random;", "", ApiSince=36)>]
static member From : Java.Util.RandomGenerators.IRandomGenerator -> Java.Util.Random
Parameters
- generator
- IRandomGenerator
The random generator that supplies results for the returned object's delegated method calls.
Returns
the delegating Random instance
- Attributes
Remarks
Returns an instance of Random that delegates method calls to the RandomGenerator argument. If the generator is an instance of Random, it is returned. Otherwise, this method returns an instance of Random that delegates all methods except setSeed to the generator. The returned instance's setSeed method always throws UnsupportedOperationException. The returned instance is not serializable.
Java reference for java.util.Random.from.