Skip to content

Commit

Permalink
cleaned up javadoc
Browse files Browse the repository at this point in the history
  • Loading branch information
Claudenw committed Jul 7, 2023
1 parent c3fbcf5 commit ea0129b
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
* 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
* execute the @code{text} with a zero value for each remaining @{code idx} value.
* @Since 4.5
*/
class CountingLongPredicate implements LongPredicate {
private int idx = 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@
import java.util.function.Predicate;

/**
* A 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 @{code test} are executed with a {@code null} value.
* If the calls to @{code test} do not exhaust the @{code ary} the @{code
* A 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 {@code test} are executed with a {@code null} value.
* 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
* {@code null} value for each remaining @{code idx} value.
* {@code null} value for each remaining {@code idx} value.
*
* @param <T> the type of object being compared.
* @Since 4.5
Expand All @@ -36,12 +36,12 @@ class CountingPredicate<T> implements Predicate<T> {
private final BiPredicate<T, T> func;

/**
* Constructs an instance that will compare the elements in @{code ary} with the
* elements returned by @{code func}. function is called as @{code func.test(
* idxValue, otherValue )}. If there are more @{code otherValue} values than
* Constructs an instance that will compare the elements in {@code ary} with the
* elements returned by {@code func}. function is called as {@code func.test(
* idxValue, otherValue )}. If there are more {@code otherValue} values than
*
* @{code idxValues} then @{code func} is called as @{code func.test( null,
* otherValue )}.
* {@code idxValues} then {@code func} is called as {@code func.test(null, otherValue)}.
*
* @param ary The array of long values to compare.
* @param func The function to apply to the pairs of long values.
*/
Expand All @@ -58,8 +58,8 @@ public boolean test(final T other) {
/**
* Call the T-T consuming bi-predicate for each remaining unpaired T in the
* input array. This method should be invoked after the predicate has been
* passed to a @{code TProducer#forEachT(BiPredicate(T,T))} to consume any
* unpaired Ts. The second argument to the bi-predicate will be @{code null}.
* passed to a {@code TProducer#forEachT(BiPredicate(T,T))} to consume any
* unpaired Ts. The second argument to the bi-predicate will be {@code null}.
*
* @return true if all calls the predicate were successful
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ private ExtendCheck() {

/**
* Advances the target once a merge has been performed.
* @return A Predicate suitable for the LayerManager {@code extendCheck} parameter.
*/
public static final Predicate<LayerManager> advanceOnPopulated() {
return ADVANCE_ON_POPULATED;
Expand All @@ -76,6 +77,7 @@ public static final Predicate<LayerManager> advanceOnPopulated() {
/**
* Does not automatically advance the target. next() must be called directly to
* perform the advance.
* @return A Predicate suitable for the LayerManager {@code extendCheck} parameter.
*/
public static final Predicate<LayerManager> neverAdvance() {
return NEVER_ADVANCE;
Expand All @@ -88,7 +90,7 @@ public static final Predicate<LayerManager> neverAdvance() {
* created.
*
* @param shape The shape of the filters in the LayerManager.
* @return A Predicate suitable for the LayerManager extendCheck parameter.
* @return A Predicate suitable for the LayerManager {@code extendCheck} parameter.
*/
public static final Predicate<LayerManager> advanceOnCalculatedSaturation(Shape shape) {
return advanceOnSaturation(shape.estimateMaxN());
Expand All @@ -99,7 +101,7 @@ public static final Predicate<LayerManager> advanceOnCalculatedSaturation(Shape
* the current target.
*
* @param breakAt the number of filters to merge into each filter in the list.
* @return A Predicate suitable for the LayerManager extendCheck parameter.
* @return A Predicate suitable for the LayerManager {@code extendCheck} parameter.
* @throws IllegalArgumentException if breakAt is &lt;= 0
*/
public static Predicate<LayerManager> advanceOnCount(int breakAt) {
Expand All @@ -122,7 +124,7 @@ public boolean test(LayerManager filter) {
* maxN specified.
*
* @param maxN the maximum number of estimated items in the filter.
* @return A Predicate suitable for the LayerManager extendCheck parameter.
* @return A Predicate suitable for the LayerManager {@code extendCheck} parameter.
* @throws IllegalArgumentException if maxN is &lt;= 0
*/
public static final Predicate<LayerManager> advanceOnSaturation(double maxN) {
Expand All @@ -138,7 +140,7 @@ public static final Predicate<LayerManager> advanceOnSaturation(double maxN) {

/**
* Static methods to create a Consumer of a LinkedList of BloomFilter perform
* tests on whether to reduce the collecton of Bloom filters.
* tests on whether to reduce the collection of Bloom filters.
*
*/
public static class Cleanup {
Expand All @@ -156,6 +158,7 @@ private Cleanup() {

/**
* A Cleanup that never removes anything.
* @return A Consumer suitable for the LayerManager {@code cleanup} parameter.
*/
public static final Consumer<LinkedList<BloomFilter>> noCleanup() {
return NO_CLEANUP;
Expand All @@ -167,7 +170,7 @@ public static final Consumer<LinkedList<BloomFilter>> noCleanup() {
*
* @param maxSize the maximum number of filters for the list. Must be greater
* than 0
* @return A Consumer for the LayerManager filterCleanup constructor argument.
* @return A Consumer suitable for the LayerManager {@code cleanup} parameter.
* @throws IllegalArgumentException if maxSize is &lt;= 0
*/
public static final Consumer<LinkedList<BloomFilter>> onMaxSize(int maxSize) {
Expand All @@ -184,7 +187,7 @@ public static final Consumer<LinkedList<BloomFilter>> onMaxSize(int maxSize) {
/**
* Removes the last added target if it is empty.
*
* @return A Consumer for the LayerManager filterCleanup constructor argument.
* @return A Consumer suitable for the LayerManager {@code cleanup} parameter.
*/
public static final Consumer<LinkedList<BloomFilter>> removeEmptyTarget() {
return REMOVE_EMPTY_TARGET;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
* removes them. It also checks it a new layer should be added, and if so adds
* it and sets the {@code target} before the operation.</li>
* </ul>
* @Since 4.5
*/
public class LayeredBloomFilter implements BloomFilter, BloomFilterProducer {
private final Shape shape;
Expand Down

0 comments on commit ea0129b

Please sign in to comment.