[ 
https://issues.apache.org/jira/browse/COLLECTIONS-393?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13436272#comment-13436272
 ] 

Thomas Neidhart commented on COLLECTIONS-393:
---------------------------------------------

The code seems to have been adapted from google guava, which is fair enough as 
it is under Apache license itself.

Similar to guava, I would embed the functionality in ListUtils and hide actual 
Partition implementation.
                
> Split / Partition a collection into smaller collections
> -------------------------------------------------------
>
>                 Key: COLLECTIONS-393
>                 URL: https://issues.apache.org/jira/browse/COLLECTIONS-393
>             Project: Commons Collections
>          Issue Type: New Feature
>          Components: Collection
>            Reporter: Chris Shayan
>             Fix For: 4.0
>
>         Attachments: Partition.java, TestPartition.java
>
>   Original Estimate: 24h
>  Remaining Estimate: 24h
>
> Returns consecutive sublists of a list, each of the same size (the final list 
> may be smaller). For example, partitioning a list containing [a, b, c, d, e] 
> with a partition size of 3 yields [[a, b, c], [d, e]] -- an outer list 
> containing two inner lists of three and two elements, all in the original 
> order. 
> The outer list is unmodifiable, but reflects the latest state of the source 
> list. The inner lists are sublist views of the original list, produced on 
> demand using List.subList(int, int), and are subject to all the usual caveats 
> about modification as explained in that API. Adapted from 
> http://code.google.com/p/google-collections/
> Inspired by Lars Vogel

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to