public class SingletonRandomFactory extends java.lang.Object implements Random, NamedFactory<Random>
NamedFactory.Utils| Constructor and Description |
|---|
SingletonRandomFactory(NamedFactory<Random> factory) |
| Modifier and Type | Method and Description |
|---|---|
Random |
create()
Create a new instance
|
void |
fill(byte[] bytes,
int start,
int len)
Fill part of bytes with random values.
|
java.lang.String |
getName()
Name of this factory
|
int |
random(int max)
Returns a pseudo-random uniformly distributed
int
in the half-open range [0, n). |
public SingletonRandomFactory(NamedFactory<Random> factory)
public void fill(byte[] bytes,
int start,
int len)
Randompublic int random(int max)
Randomint
in the half-open range [0, n).public java.lang.String getName()
NamedFactorygetName in interface NamedFactory<Random>Copyright © 2008-2014 The Apache Software Foundation. All Rights Reserved.