public <U> CollectionStream<U> map(final Func1<T, U> mapper) {
        if (mapper != null) {
            final LinkedList<Object> coll = getCollectionForWrite();
            final int size = coll.size();
            for (int i = 0; i < size; i++) {
                final Object newElement = mapper.call((T) coll.removeLast());
                coll.addFirst(newElement);
            }
        }
        return (CollectionStream<U>) this;
    }
mimics {@link java.util.stream.Stream#map(Function)}
Note that mapping is immediately executed .
main/src/main/java/cgeo/geocaching/utils/CollectionStream.java