public class SingletonRandomFactory extends AbstractRandom implements RandomFactory
BuiltinFactory.Utils
BY_NAME_COMPARATOR, NAME_EXTRACTOR
FALSE, TRUE
Constructor and Description |
---|
SingletonRandomFactory(NamedFactory<Random> factory) |
Modifier and Type | Method and Description |
---|---|
Random |
create() |
void |
fill(byte[] bytes,
int start,
int len)
Fill part of bytes with random values.
|
String |
getName() |
boolean |
isSupported() |
int |
random(int max)
Returns a pseudo-random uniformly distributed
int
in the half-open range [0, n). |
fill, toString
public SingletonRandomFactory(NamedFactory<Random> factory)
public boolean isSupported()
isSupported
in interface OptionalFeature
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()
getName
in interface NamedResource
Copyright © 2008–2016 The Apache Software Foundation. All rights reserved.