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

CollectionUtils.filter() should return a boolean indicating whether the Collection was modified as a result of the call.

    XMLWordPrintableJSON

Details

    • Wish
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 3.2
    • 4.0-alpha1, 4.0
    • Collection
    • None

    Description

      Here is what I mean:

      • test 1:
        List l = new ArrayList();
        l.add("test");
        assertTrue( CollectionUtils.filter(l, FalsePredicate.getInstance()) );
        assertTrue(l.isEmpty());
      • test 2:
        List l = new ArrayList();
        l.add("test");
        assertFalse( CollectionUtils.filter(l, TruePredicate.getInstance()) );
        assertEquals(1, l.size());

      Attachments

        1. COLLECTIONS-362.patch
          3 kB
          Jean-Noel Rouvignac

        Issue Links

          Activity

            People

              brentworden Brent Worden
              jnrouvignac Jean-Noel Rouvignac
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: