diff --git a/src/main/java/org/apache/commons/collections4/bloomfilter/BloomFilterIndexer.java b/src/main/java/org/apache/commons/collections4/bloomfilter/BloomFilterIndexer.java index 87037e7df..4f617035e 100644 --- a/src/main/java/org/apache/commons/collections4/bloomfilter/BloomFilterIndexer.java +++ b/src/main/java/org/apache/commons/collections4/bloomfilter/BloomFilterIndexer.java @@ -19,7 +19,7 @@ package org.apache.commons.collections4.bloomfilter; /** * Contains functions to convert {@code int} indices into Bloom filter bit positions. */ -final class BloomFilterIndexer { +public final class BloomFilterIndexer { /** A bit shift to apply to an integer to divided by 64 (2^6). */ private static final int DIVIDE_BY_64 = 6; @@ -32,7 +32,7 @@ final class BloomFilterIndexer { * @param bitIndex the bit index * @throws IndexOutOfBoundsException if the index is not positive */ - static void checkPositive(int bitIndex) { + public static void checkPositive(int bitIndex) { if (bitIndex < 0) { throw new IndexOutOfBoundsException("Negative bitIndex: " + bitIndex); } @@ -52,7 +52,7 @@ final class BloomFilterIndexer { * @return the filter index * @see #checkPositive(int) */ - static int getLongIndex(int bitIndex) { + public static int getLongIndex(int bitIndex) { // An integer divide by 64 is equivalent to a shift of 6 bits if the integer is positive. // We do not explicitly check for a negative here. Instead we use a // a signed shift. Any negative index will produce a negative value @@ -74,7 +74,7 @@ final class BloomFilterIndexer { * @return the filter bit * @see #checkPositive(int) */ - static long getLongBit(int bitIndex) { + public static long getLongBit(int bitIndex) { // Bit shifts only use the first 6 bits. Thus it is not necessary to mask this // using 0x3f (63) or compute bitIndex % 64. // Note: If the index is negative the shift will be (64 - (bitIndex & 0x3f)) and diff --git a/src/main/java/org/apache/commons/collections4/bloomfilter/hasher/HashFunctionValidator.java b/src/main/java/org/apache/commons/collections4/bloomfilter/hasher/HashFunctionValidator.java index a79b67fc2..b9876e8ca 100644 --- a/src/main/java/org/apache/commons/collections4/bloomfilter/hasher/HashFunctionValidator.java +++ b/src/main/java/org/apache/commons/collections4/bloomfilter/hasher/HashFunctionValidator.java @@ -22,7 +22,7 @@ import java.util.Objects; /** * Contains validation for hash functions. */ -final class HashFunctionValidator { +public final class HashFunctionValidator { /** Do not instantiate. */ private HashFunctionValidator() {} @@ -66,7 +66,7 @@ final class HashFunctionValidator { * @return true, if successful * @see String#equalsIgnoreCase(String) */ - static boolean areEqual(HashFunctionIdentity a, HashFunctionIdentity b) { + public static boolean areEqual(HashFunctionIdentity a, HashFunctionIdentity b) { return (a.getSignedness() == b.getSignedness() && a.getProcessType() == b.getProcessType() && a.getName().equalsIgnoreCase(b.getName())); @@ -81,7 +81,7 @@ final class HashFunctionValidator { * @see #areEqual(HashFunctionIdentity, HashFunctionIdentity) * @throws IllegalArgumentException if the hash functions are not equal */ - static void checkAreEqual(HashFunctionIdentity a, HashFunctionIdentity b) { + public static void checkAreEqual(HashFunctionIdentity a, HashFunctionIdentity b) { if (!areEqual(a, b)) { throw new IllegalArgumentException(String.format("Hash functions are not equal: (%s) != (%s)", HashFunctionIdentity.asCommonString(a), HashFunctionIdentity.asCommonString(b)));