-
Notifications
You must be signed in to change notification settings - Fork 11.1k
Description
Original issue created by em...@soldal.org on 2012-05-23 at 04:42 PM
In ref to https://groups.google.com/d/topic/guava-discuss/NfE09gFfPjU/discussion
This issue discusses the addition of the following three methods to Iterables:
Iterable<List<T>> partition(Iterable<T> iterable, Comparator<T> comparator)
Iterable<List<T>> parition(Iterable<T> iterable, Equivalence<T> equivalence)
Iterable<List<T>> parition(Iterable<T extends Comparable<? super T>> iterable)
The proposed function of these methods would be to group or chunk like items together without disrupting the order of the elements or their occurrence in the underlying iterable or boundaries in the underlying iterable.
As a side-effect of this it would also be prudent to add something to Equivalences like Equivalence<T> from(Comparator<T> comparator) for completeness.