[
https://issues.apache.org/jira/browse/COLLECTIONS-667?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16308860#comment-16308860
]
BELUGA BEHR commented on COLLECTIONS-667:
-----------------------------------------
Something akin to
[IteratorUtils|https://commons.apache.org/proper/commons-collections/javadocs/api-release/org/apache/commons/collections4/IteratorUtils.html#chainedIterator(java.util.Iterator...)].
{code}
public Collection concat(Collection c...) {
ArrayList results = new ArrayList():
for (Collection a : c) {
results.addAll(a);
}
return results;
{code}
* May want to size the ArrayList first to avoid having to expand the internal
buffer multiple times
* Maybe create a new Collection object that keeps a pointer to each internal
Collection
> CollectionUtils Concat Method
> -----------------------------
>
> Key: COLLECTIONS-667
> URL: https://issues.apache.org/jira/browse/COLLECTIONS-667
> Project: Commons Collections
> Issue Type: New Feature
> Components: Collection
> Reporter: BELUGA BEHR
> Priority: Minor
>
> Add a _concat_ method which returns a Collection of all the Collections in
> the argument list
> {code}
> public Collection concat(Collection c...)
> {code}
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)