@@ -47,6 +47,7 @@ public interface Enumerable<X> extends Collection<X> {
4747
4848 /**
4949 * Passes each element of the collection to the given block.
50+ * If no predicate (null) is given, then true is returned instead.
5051 * @param prd The predicate to match each element.
5152 * @return The true if the block never returns false or nil.
5253 */
@@ -62,6 +63,7 @@ default boolean all(Predicate<X> prd) {
6263
6364 /**
6465 * Passes at least one element of the collection to the given block.
66+ * If no predicate (null) is given, then true is returned instead.
6567 * @param prd The predicate to match at least one element.
6668 * @return The true if the block never returns false or nil.
6769 */
@@ -77,6 +79,7 @@ default boolean any(Predicate<X> prd) {
7779
7880 /**
7981 * Doesn't passes elements of the collection to the given block.
82+ * If no predicate (null) is given, then true is returned instead.
8083 * @param prd The predicate to match none elements.
8184 * @return The true if the block never returns false or nil.
8285 */
@@ -159,7 +162,7 @@ default X find(Predicate<X> prd, X alt) {
159162
160163 /**
161164 * Returns an enumerable containing all elements, on which given function was applied.
162- * If no function (null) is given, then 'this' is returned instead.
165+ * If no function (null) is given, then empty enumerable is returned instead.
163166 * @param fnc The function to apply to each element.
164167 * @param <Y> The type of target entity.
165168 * @return The enumerable.
@@ -197,7 +200,6 @@ default long count(Predicate<X> prd) {
197200 * Returns a result of the reduction of the elements in this stream,
198201 * using provided identity value and accumulation function operator.
199202 * If no function (null) is given, then identity is returned instead.
200- *
201203 * @param idn The identity value of the accumulation function.
202204 * @param opr The accumulation function operator which combining previous and current values.
203205 * @return Result of of combining elements.
@@ -230,6 +232,7 @@ default Enumerable<X> after(Predicate<X> prd) {
230232 * @param prd The function to match element after which enumerable elements should be returned.
231233 * @param size The number of elements the enumerable should be limited to.
232234 * @return The enumerable.
235+ * @throws IllegalArgumentException If the size is negative.
233236 */
234237 default Enumerable <X > after (Predicate <X > prd , long size ) {
235238 final Enumerable <X > out ;
0 commit comments