public class Randomizer extends Lifecycle implements IRandomizer
ILifecycle.DeferrableActivation| Modifier and Type | Field and Description |
|---|---|
static String |
ALGORITHM_SHA1PRNG |
static 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) |
String |
getAlgorithm() |
String |
getAlgorithmName() |
String |
getProviderName() |
boolean |
nextBoolean() |
void |
nextBytes(byte[] bytes) |
double |
nextDouble() |
float |
nextFloat() |
double |
nextGaussian() |
int |
nextInt() |
int |
nextInt(int n) |
long |
nextLong() |
String |
nextString(int length,
String alphabet) |
void |
setAlgorithmName(String algorithmName) |
void |
setProviderName(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 String ALGORITHM_SHA1PRNG
public static final String DEFAULT_ALGORITHM_NAME
public String getAlgorithmName()
public void setAlgorithmName(String algorithmName)
public String getProviderName()
public void setProviderName(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 String getAlgorithm()
public void nextBytes(byte[] bytes)
nextBytes in interface IRandomizerpublic String nextString(int length, String alphabet)
nextString in interface IRandomizerprotected void doBeforeActivate()
throws Exception
doBeforeActivate in class LifecycleExceptionprotected void doActivate()
throws Exception
doActivate in class LifecycleExceptionprotected void doDeactivate()
throws Exception
doDeactivate in class LifecycleExceptionCopyright (c) 2014 Eike Stepper (Berlin, 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