Skip to content

Commit 1e4d65c

Browse files
committed
Remove code duplication for chunk method in lodash plugin.
1 parent 2862908 commit 1e4d65c

File tree

1 file changed

+0
-15
lines changed
  • lodash-plugin/src/main/java/com/github/underscore/lodash

1 file changed

+0
-15
lines changed

lodash-plugin/src/main/java/com/github/underscore/lodash/$.java

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -583,21 +583,6 @@ public Chain<T> chain() {
583583
return new $.Chain<T>(newArrayList(value()));
584584
}
585585

586-
public static <T> List<List<T>> chunk(final Iterable<T> iterable, final int size) {
587-
int index = 0;
588-
int length = size(iterable);
589-
final List<List<T>> result = new ArrayList<List<T>>(length / size);
590-
while (index < length) {
591-
result.add(newArrayList(iterable).subList(index, Math.min(length, index + size)));
592-
index += size;
593-
}
594-
return result;
595-
}
596-
597-
public List<List<T>> chunk(final int size) {
598-
return chunk(getIterable(), size);
599-
}
600-
601586
public static <T> List<T> drop(final Iterable<T> iterable) {
602587
return rest(newArrayList(iterable));
603588
}

0 commit comments

Comments
 (0)