public CollectionStream<T> filter(final Func1<T, Boolean> filter) {
        if (filter != null) {
            final LinkedList<Object> coll = getCollectionForWrite();
            final Iterator<Object> it = coll.iterator();
            while (it.hasNext()) {
                final Object element = it.next();
                if (!filter.call((T) element)) {
                    it.remove();
                }
            }
        }
        return this;
    }
mimics {@link java.util.stream.Stream#filter(Predicate)}
Note that filtering is immediately executed.
main/src/main/java/cgeo/geocaching/utils/CollectionStream.java