Provides a reproducible source of randomness seeded by a long seed in the settings with the key setting. @param settings the settings containing the seed @param setting the setting to access the seed @return a reproducible source of randomness
(Settings settings, Setting<Long> setting)
| 77 | * @return a reproducible source of randomness |
| 78 | */ |
| 79 | public static Random get(Settings settings, Setting<Long> setting) { |
| 80 | if (setting.exists(settings)) { |
| 81 | return new Random(setting.get(settings)); |
| 82 | } else { |
| 83 | return get(); |
| 84 | } |
| 85 | } |
| 86 | |
| 87 | /** |
| 88 | * Provides a source of randomness that is reproducible when |