Uploaded image for project: 'Commons Collections'
  1. Commons Collections
  2. COLLECTIONS-674

Add CollectionUtils removeRange, removeCount

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 4.1
    • Fix Version/s: None
    • Component/s: Collection
    • Labels:
      None

      Description

      Add CollectionUtils removeRange and removeCount.

      Original request:

      Add a Collections.drain() method which removes the first N elements from the collection and returns them.  This method would have the side-effect of modifying the input collections (due to removal).

       

      // Some suggestions
      void Collections.drain(Collection<T> from, Collection<T> to, int count);
      Collection<t> Collections.drain(Collection<t> from, int count);

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                belugabehr David Mollitor
              • Votes:
                0 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 10m
                  10m