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

Add CollectionUtils removeRange, removeCount

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 4.1
    • None
    • Collection
    • 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

              Unassigned Unassigned
              belugabehr David Mollitor
              Votes:
              0 Vote for this issue
              Watchers:
              5 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