By: John Vasileff
License: http://opensource.org/licenses/MIT
Packages
com.vasileff.ceylon.random.java
Dependencies
ceylon.interop.java1.1.0
ceylon.math1.1.0
com.vasileff.ceylon.random.api0.0.2
java.base7
Functions
randomWholeshared Whole randomWhole(Whole origin, Whole bound, Random random = ...)

Generate a pseudorandom Whole number in the range origin (inclusive) to bound (exclusive).

Parameters:
  • origin

    The lower bound, inclusive. May be negative.

  • bound

    The upper bound, exclusive. Must be greater than origin.

  • random = LCGRandom()

    The entropy source.

Throws
  • Exception

    if origin <= bound

randomWholeBitsshared Whole randomWholeBits(Integer numBits, Random random = ...)

Generate a Whole number holding numBits pseudorandom bits. This method returns zero if numBits <= 0.

Parameters:
  • numBits

    The number of bits.

  • random = LCGRandom()

    The entropy source.

Classes
JavaRandomshared final JavaRandom

A pseudorandom number generator backed by java.util.Random.

JavaRandomAdaptershared JavaRandomAdapter<Delegate>
given Delegate satisfies Random

Adapts java.util.Random to Random.

JavaSecureRandomshared final JavaSecureRandom

A cryptographically strong random number generator backed by java.security.SecureRandom.