public class Randomizer extends Lifecycle implements IRandomizer
ILifecycle.DeferrableActivation| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
ALGORITHM_SHA1PRNG |
static java.lang.String |
DEFAULT_ALGORITHM_NAME |
| Constructor and Description |
|---|
Randomizer() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
doActivate() |
protected void |
doBeforeActivate() |
protected void |
doDeactivate() |
byte[] |
generateSeed(int numBytes) |
java.lang.String |
getAlgorithm() |
java.lang.String |
getAlgorithmName() |
java.lang.String |
getProviderName() |
boolean |
nextBoolean() |
void |
nextBytes(byte[] bytes) |
double |
nextDouble() |
float |
nextFloat() |
double |
nextGaussian() |
int |
nextInt() |
int |
nextInt(int n) |
long |
nextLong() |
java.lang.String |
nextString(int length,
java.lang.String alphabet) |
void |
setAlgorithmName(java.lang.String algorithmName) |
void |
setProviderName(java.lang.String providerName) |
void |
setSeed(byte[] seed) |
void |
setSeed(long seed) |
activate, checkActive, checkArg, checkArg, checkInactive, checkNull, checkState, checkState, deactivate, deferredActivate, doAfterActivate, doBeforeDeactivate, dump, getLifecycleState, isActive, isDeferredActivation, toStringaddListener, fireEvent, fireEvent, fireEvent, fireThrowable, firstListenerAdded, getListeners, getNotificationService, hasListeners, lastListenerRemoved, removeListenerclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaddListener, getListeners, hasListeners, removeListenerpublic static final java.lang.String ALGORITHM_SHA1PRNG
public static final java.lang.String DEFAULT_ALGORITHM_NAME
public java.lang.String getAlgorithmName()
public void setAlgorithmName(java.lang.String algorithmName)
public java.lang.String getProviderName()
public void setProviderName(java.lang.String providerName)
public void setSeed(byte[] seed)
public void setSeed(long seed)
public boolean nextBoolean()
nextBoolean in interface IRandomizerpublic double nextDouble()
nextDouble in interface IRandomizerpublic float nextFloat()
nextFloat in interface IRandomizerpublic double nextGaussian()
nextGaussian in interface IRandomizerpublic int nextInt()
nextInt in interface IRandomizerpublic int nextInt(int n)
nextInt in interface IRandomizerpublic long nextLong()
nextLong in interface IRandomizerpublic byte[] generateSeed(int numBytes)
generateSeed in interface IRandomizerpublic java.lang.String getAlgorithm()
public void nextBytes(byte[] bytes)
nextBytes in interface IRandomizerpublic java.lang.String nextString(int length,
java.lang.String alphabet)
nextString in interface IRandomizerprotected void doBeforeActivate()
throws java.lang.Exception
doBeforeActivate in class Lifecyclejava.lang.Exceptionprotected void doActivate()
throws java.lang.Exception
doActivate in class Lifecyclejava.lang.Exceptionprotected void doDeactivate()
throws java.lang.Exception
doDeactivate in class Lifecyclejava.lang.ExceptionCopyright (c) 2004-2019 Eike Stepper (Loehne, Germany) and others.
All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html