public class SingletonRandomFactory extends 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.
|
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)
Random
public int random(int max)
Random
int
in the half-open range [0, n).public String getName()
NamedFactory
getName
in interface NamedFactory<Random>
Copyright © 2008–2014 The Apache Software Foundation. All rights reserved.