com.pega.pegarules.pub.util
Interface Random


public interface Random

PRRandom provides a system wide time-seeded randome number generator.

Version:
$Revision: 31 $ $Date: 2009-06-24 09:38:04 -0400 (Wed, 24 Jun 2009) $
Author:
Bill Clinton

Field Summary
static java.lang.String COPYRIGHT
           
static java.lang.String VERSION
           
 
Method Summary
 boolean nextBoolean()
          returns the next random boolean in the sequence
 void nextBytes(byte[] bytes)
          fills the sypplied array of bytes with random bytes
 double nextDouble()
          returns the next random double in the sequence
 float nextFloat()
          returns the next random float in the sequence
 double nextGaussian()
          returns the next Gaussian random (normal distribution) double in the sequence
 int nextInt()
          returns the next random integer in the sequence
 int nextInt(int n)
          returns the next random integer (between 0 and n inclusive) in the sequence
 long nextLong()
          returns the next random long in the sequence
 

Field Detail

COPYRIGHT

static final java.lang.String COPYRIGHT
See Also:
Constant Field Values

VERSION

static final java.lang.String VERSION
See Also:
Constant Field Values
Method Detail

nextBoolean

boolean nextBoolean()
returns the next random boolean in the sequence

Returns:
value
See Also:
Random.nextBoolean()

nextBytes

void nextBytes(byte[] bytes)
fills the sypplied array of bytes with random bytes

Parameters:
bytes -
See Also:
Random.nextBytes(byte[])

nextDouble

double nextDouble()
returns the next random double in the sequence

Returns:
value
See Also:
Random.nextDouble()

nextGaussian

double nextGaussian()
returns the next Gaussian random (normal distribution) double in the sequence

Returns:
value
See Also:
Random.nextGaussian()

nextFloat

float nextFloat()
returns the next random float in the sequence

Returns:
value
See Also:
Random.nextFloat()

nextInt

int nextInt()
returns the next random integer in the sequence

Returns:
value
See Also:
Random.nextInt()

nextInt

int nextInt(int n)
returns the next random integer (between 0 and n inclusive) in the sequence

Parameters:
n - upper limit for the random numbers returned.
Returns:
value
See Also:
Random.nextInt(int n)

nextLong

long nextLong()
returns the next random long in the sequence

Returns:
value
See Also:
Random.nextLong()


Copyright © 2012 Pegasystems Inc. All Rights Reserved.