You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by ah...@apache.org on 2021/06/14 15:13:31 UTC
[commons-rng] branch master updated: Remove public keyword from
package-private utility class static methods
This is an automated email from the ASF dual-hosted git repository.
aherbert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-rng.git
The following commit(s) were added to refs/heads/master by this push:
new 33bb9eb Remove public keyword from package-private utility class static methods
33bb9eb is described below
commit 33bb9ebc351feb79a3bb45ff66f5088850a097c5
Author: aherbert <ah...@apache.org>
AuthorDate: Mon Jun 14 16:13:27 2021 +0100
Remove public keyword from package-private utility class static methods
---
.../org/apache/commons/rng/sampling/distribution/InternalUtils.java | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/commons-rng-sampling/src/main/java/org/apache/commons/rng/sampling/distribution/InternalUtils.java b/commons-rng-sampling/src/main/java/org/apache/commons/rng/sampling/distribution/InternalUtils.java
index bd55384..af4c049 100644
--- a/commons-rng-sampling/src/main/java/org/apache/commons/rng/sampling/distribution/InternalUtils.java
+++ b/commons-rng-sampling/src/main/java/org/apache/commons/rng/sampling/distribution/InternalUtils.java
@@ -48,7 +48,7 @@ final class InternalUtils { // Class is package-private on purpose; do not make
* @throws IndexOutOfBoundsException if the result is too large to be represented
* by a {@code long} (i.e. if {@code n > 20}), or {@code n} is negative.
*/
- public static long factorial(int n) {
+ static long factorial(int n) {
return FACTORIALS[n];
}
@@ -61,7 +61,7 @@ final class InternalUtils { // Class is package-private on purpose; do not make
* probability is negative, infinite or {@code NaN}, or the sum of all
* probabilities is not strictly positive.
*/
- public static double validateProbabilities(double[] probabilities) {
+ static double validateProbabilities(double[] probabilities) {
if (probabilities == null || probabilities.length == 0) {
throw new IllegalArgumentException("Probabilities must not be empty.");
}
@@ -84,7 +84,7 @@ final class InternalUtils { // Class is package-private on purpose; do not make
* @param probability Probability.
* @throws IllegalArgumentException if {@code probability} is negative, infinite or {@code NaN}.
*/
- public static void validateProbability(double probability) {
+ static void validateProbability(double probability) {
if (probability < 0 ||
Double.isInfinite(probability) ||
Double.isNaN(probability)) {