org.optaplanner.core.impl.solver.random

## Class DefaultRandomFactory

- java.lang.Object
- - org.optaplanner.core.impl.solver.random.DefaultRandomFactory

- All Implemented Interfaces:
    RandomFactory

      public class DefaultRandomFactory
      extends Object
      implements RandomFactory

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected Long` | `randomSeed`
    `protected RandomType` | `randomType`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `DefaultRandomFactory(RandomType randomType, Long randomSeed)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `Random` | `createRandom()`
    `String` | `toString()`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### randomType

          protected final RandomType randomType

    - #### randomSeed

          protected final Long randomSeed

  - ### Constructor Detail

    - #### DefaultRandomFactory

          public DefaultRandomFactory(RandomType randomType,
                                      Long randomSeed)

      Parameters:
        `randomType` - never null
        `randomSeed` - null if no seed

  - ### Method Detail

    - #### createRandom

          public Random createRandom()

      Specified by:
        `createRandom` in interface `RandomFactory`
      Returns:
        never null

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

Copyright © 2006–2020 JBoss by Red Hat. All rights reserved.