Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| OptaPlanner distribution 6.0.0.Beta3
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.optaplanner.core.impl.util
Class RandomUtils

    java.lang.Object
      org.optaplanner.core.impl.util.RandomUtils

    public class RandomUtils

extends Object

Method Summary
`static double` | `nextDouble(Random random, double n)` Mimics `Random.nextInt(int)` for doubles.
`static long` | `nextLong(Random random, long n)` Mimics `Random.nextInt(int)` for longs.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Method Detail

### nextLong

    public static long nextLong(Random random,
                                long n)

  Mimics `Random.nextInt(int)` for longs.

  Parameters:
    `random` - never null
    `n` - > 0L
  Returns:
    like `Random.nextInt(int)` but for a long
  See Also:
    `Random.nextInt(int)`

### nextDouble

    public static double nextDouble(Random random,
                                    double n)

  Mimics `Random.nextInt(int)` for doubles.

  Parameters:
    `random` - never null
    `n` - > 0.0
  Returns:
    like `Random.nextInt(int)` but for a double
  See Also:
    `Random.nextInt(int)`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| OptaPlanner distribution 6.0.0.Beta3
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2006-2013 JBoss by Red Hat. All Rights Reserved.