public static <T extends Collection<E>, E> T removeWithAddIf(T targetCollection, T resultCollection, Predicate<? super E> predicate) {
		Objects.requireNonNull(predicate);
		final Iterator<E> each = targetCollection.iterator();
		while (each.hasNext()) {
			E next = each.next();
			if (predicate.test(next)) {
				resultCollection.add(next);
				each.remove();
			}
		}
		return resultCollection;
	}
@Test
	public void testRemoveWithAddIf() {
		ArrayList<Integer> list = CollUtil.newArrayList(1, 2, 3);
		final ArrayList<Integer> exceptRemovedList = CollUtil.newArrayList(2, 3);
		final ArrayList<Integer> exceptResultList = CollUtil.newArrayList(1);

		List<Integer> resultList = CollUtil.removeWithAddIf(list, ele -> 1 == ele);
		assertEquals(list, exceptRemovedList);
		assertEquals(resultList, exceptResultList);

		list = CollUtil.newArrayList(1, 2, 3);
		resultList = new ArrayList<>();
		CollUtil.removeWithAddIf(list, resultList, ele -> 1 == ele);
		assertEquals(list, exceptRemovedList);
		assertEquals(resultList, exceptResultList);
	}