Skip to content

Commit

Permalink
Small documentation changes.
Browse files Browse the repository at this point in the history
  • Loading branch information
rgiulietti committed May 15, 2024
1 parent 4bc5bf9 commit 920655a
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -194,8 +194,8 @@ private static Map<String, RandomGeneratorProperties> createFactoryMap() {
);
}

private static Map.Entry<String, RandomGeneratorProperties>
entry(Class<? extends RandomGenerator> rgClass, String name, String group,
private static Map.Entry<String, RandomGeneratorProperties> entry(
Class<? extends RandomGenerator> rgClass, String name, String group,
int i, int j, int k, int equidistribution,
int flags) {
return Map.entry(name,
Expand Down Expand Up @@ -610,7 +610,7 @@ public boolean isDeprecated() {
* Create an instance of {@link RandomGenerator} based on the
* <a href="package-summary.html#algorithms">algorithm</a> chosen.
*
* @return new in instance of {@link RandomGenerator}.
* @return new instance of {@link RandomGenerator}.
*/
public T create() {
@SuppressWarnings("unchecked")
Expand All @@ -621,15 +621,17 @@ public T create() {
/**
* Create an instance of {@link RandomGenerator} based on the
* <a href="package-summary.html#algorithms">algorithm</a> chosen,
* and providing a starting long seed.
* If a long seed is not supported by the algorithm,
* an {@link UnsupportedOperationException} is thrown.
* and the provided {@code seed}.
* If the {@link RandomGenerator} doesn't support instantiation through
* a {@code seed} of type {@code long} then this method throws
* an {@link UnsupportedOperationException}.
*
* @param seed long random seed value.
*
* @return new in instance of {@link RandomGenerator}.
* @return new instance of {@link RandomGenerator}.
*
* @throws UnsupportedOperationException if a long seed in not supported.
* @throws UnsupportedOperationException
* if a {@code seed} of type {@code long} in not supported.
*/
public T create(long seed) {
@SuppressWarnings("unchecked")
Expand All @@ -640,15 +642,18 @@ public T create(long seed) {
/**
* Create an instance of {@link RandomGenerator} based on the
* <a href="package-summary.html#algorithms">algorithm</a> chosen,
* and providing a starting byte[] seed.
* If a byte[] seed is not supported by the algorithm,
* an {@link UnsupportedOperationException} is thrown.
* and the provided {@code seed}.
* If the {@link RandomGenerator} doesn't support instantiation through
* a {@code seed} of type {@code byte[]} then this method throws
* an {@link UnsupportedOperationException}.
*
* @param seed byte array random seed value.
*
* @return new in instance of {@link RandomGenerator}.
* @return new instance of {@link RandomGenerator}.
*
* @throws UnsupportedOperationException
* if a {@code seed} of type {@code byte[]} in not supported.
*
* @throws UnsupportedOperationException if a byte[] seed in not supported.
* @throws NullPointerException if seed is null.
*/
public T create(byte[] seed) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,8 @@
* <blockquote>{@code import java.util.random.*;}</blockquote>
*
* Then one can choose a specific implementation by giving the name of a generator
* algorithm to the static method {@link RandomGenerator#of}, in which case no
* seed is specified by the caller:
* algorithm to the static method {@link RandomGenerator#of}, in which case
* a {@link RandomGenerator} is constructed without any seed value:
*
* <blockquote>{@code RandomGenerator g = RandomGenerator.of("L64X128MixRandom");}</blockquote>
*
Expand Down Expand Up @@ -125,8 +125,8 @@
*
* <h2>Choosing a Random Number Generator Algorithm</h2>
*
* <p> There are three groups of random number generator algorithm provided
* in Java: the Legacy group, the LXM group, and the Xoroshiro/Xoshiro group.
* <p> Random number generator algorithms are organized in groups,
* as described <a href="package-summary.html#algorithms">below</a>.
*
* <p> The legacy group includes random number generators that existed
* before JDK 17: Random, ThreadLocalRandom, SplittableRandom, and
Expand Down

0 comments on commit 920655a

Please sign in to comment.