Fixed typos originally reported in pull #323 (#349)

This commit is contained in:
Claude Warren 2022-11-06 04:56:51 -06:00 committed by GitHub
parent 3071aea62d
commit b66b6cacbb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 5 deletions

View File

@ -87,7 +87,7 @@ public class BitMap {
// An integer divide by 64 is equivalent to a shift of 6 bits if the integer is // An integer divide by 64 is equivalent to a shift of 6 bits if the integer is
// positive. // positive.
// We do not explicitly check for a negative here. Instead we use a // We do not explicitly check for a negative here. Instead we use a
// a signed shift. Any negative index will produce a negative value // signed shift. Any negative index will produce a negative value
// by sign-extension and if used as an index into an array it will throw an // by sign-extension and if used as an index into an array it will throw an
// exception. // exception.
return bitIndex >> DIVIDE_BY_64; return bitIndex >> DIVIDE_BY_64;

View File

@ -20,7 +20,7 @@ import java.util.function.LongPredicate;
/** /**
* A long predicate that applies the test func to each member of the @{code ary} in sequence for each call to @{code test()}. * A long predicate that applies the test func to each member of the @{code ary} in sequence for each call to @{code test()}.
* if the @{code ary} is exhausted, the subsequent calls to to @{code test} are executed with a zero value. * if the @{code ary} is exhausted, the subsequent calls to @{code test} are executed with a zero value.
* If the calls to @{code test} do not exhaust the @{code ary} the @{code forEachRemaining} method can be called to * If the calls to @{code test} do not exhaust the @{code ary} the @{code forEachRemaining} method can be called to
* execute the @code{text} with a zero value for each remaining @{code idx} value. * execute the @code{text} with a zero value for each remaining @{code idx} value.
* *

View File

@ -415,7 +415,7 @@ public final class Shape {
} }
/** /**
* Calculates the number of hash functions given numberOfItems and numberofBits. * Calculates the number of hash functions given numberOfItems and numberOfBits.
* This is a method so that the calculation is consistent across all constructors. * This is a method so that the calculation is consistent across all constructors.
* *
* @param numberOfItems the number of items in the filter. * @param numberOfItems the number of items in the filter.
@ -431,9 +431,9 @@ public final class Shape {
throw new IllegalArgumentException( throw new IllegalArgumentException(
String.format("Filter too small: Calculated number of hash functions (%s) was less than 1", k)); String.format("Filter too small: Calculated number of hash functions (%s) was less than 1", k));
} }
// Normally we would check that numberofHashFunctions <= Integer.MAX_VALUE but // Normally we would check that numberOfHashFunctions <= Integer.MAX_VALUE but
// since numberOfBits is at most Integer.MAX_VALUE the numerator of // since numberOfBits is at most Integer.MAX_VALUE the numerator of
// numberofHashFunctions is ln(2) * Integer.MAX_VALUE = 646456992.9449 the // numberOfHashFunctions is ln(2) * Integer.MAX_VALUE = 646456992.9449 the
// value of k can not be above Integer.MAX_VALUE. // value of k can not be above Integer.MAX_VALUE.
return (int) k; return (int) k;
} }