style: reformatted codes
This commit is contained in:
@@ -61,9 +61,11 @@ public final class CollectionUtil {
|
||||
* {@code maxSize} is less than zero, or
|
||||
* {@code collectionFactory} is {@code null}
|
||||
*/
|
||||
public static <T, C extends Collection<T>> List<C> chunk(C originalCollection,
|
||||
int maxSize,
|
||||
Supplier<C> collectionFactory) {
|
||||
public static <T, C extends Collection<T>> List<C> chunk(
|
||||
C originalCollection,
|
||||
int maxSize,
|
||||
Supplier<C> collectionFactory
|
||||
) {
|
||||
// check inputs
|
||||
if (Objects.isNull(originalCollection)) {
|
||||
throw new IllegalArgumentException("Collection must not be null.");
|
||||
|
||||
@@ -122,7 +122,7 @@ public final class RangeUtil {
|
||||
return IntStream.range(start, end);
|
||||
} else {
|
||||
// Descending range (exclusive of end)
|
||||
return IntStream.iterate(start, n -> n > end, n -> n - 1);
|
||||
return IntStream.iterate(start, (n) -> n > end, (n) -> n - 1);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user