Issue Details (XML | Word | Printable)

Key: COLLECTIONS-296
Type: New Feature New Feature
Status: Open Open
Priority: Minor Minor
Assignee: Unassigned
Reporter: Julius Davies
Votes: 1
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Commons Collections

Introduce SortedUtils.merge() for merging sorted collections

Created: 17/May/08 04:48 AM   Updated: 21/May/08 08:31 PM
Return to search
Component/s: Core
Affects Version/s: None
Fix Version/s: None

Time Tracking:
Not Specified

File Attachments:
  Size
Text File Licensed for inclusion in ASF works SortedUtils.patch 2008-05-17 04:49 AM Julius Davies 12 kB


 Description  « Hide
Is there any interest in this?

/**

  • Returns a new ArrayList where sorted Collection a and sorted Collection b
  • are combined such that ordering of the elements according to
  • Comparator c is retained. Uses the standard O merge algorithm
  • for combining two sorted lists.
    *
  • @param a Object to combine with sorted Collection b. Must implement Comparable.
  • @param b Sorted Collection to combine with Object a.
  • @param c Comparator by which Collection a and Collection b have been sorted, or null
  • if the Collections are sorted according to their natural ordering.
  • @return a new sorted ArrayList
    */
    public static ArrayList merge(Collection a, Collection b, Comparator c);


 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
There are no subversion log entries for this issue yet.