diff --git a/src/main/java/gr/james/sampling/SkipFunction.java b/src/main/java/gr/james/sampling/SkipFunction.java index 860aad4..2c7e06f 100644 --- a/src/main/java/gr/james/sampling/SkipFunction.java +++ b/src/main/java/gr/james/sampling/SkipFunction.java @@ -1,15 +1,19 @@ package gr.james.sampling; /** - * A skip function returns how many elements to skip. + * A skip function returns how many elements a reservoir algorithm must skip before accepting an element in the + * reservoir. */ @Deprecated @FunctionalInterface interface SkipFunction { /** * Returns a {@code long} indicating how many elements the algorithm must skip. + *
+ * This method is called right after an element was accepted in the reservoir. * + * @param streamSize the stream size * @return how many elements the algorithm must skip */ - long skip(); + long skip(long streamSize); }