class MappedCollection<U, V> extends AbstractCollection<U> {
    private final Collection<V> list;
    private final Function<V, U> mapper;

    public MappedCollection(Collection<V> list, Function<V, U> mapper) {
        this.list = list;
        this.mapper = mapper;
    }

    @Override
    public Iterator<U> iterator() {<FILL_FUNCTION_BODY>}

    @Override
    public int size() {
        return list.size();
    }
}

        Iterator<V> it = list.iterator();
        return new Iterator<U>() {
            @Override
            public boolean hasNext() {
                return it.hasNext();
            }

            @Override
            public U next() {
                return mapper.apply(it.next());
            }
        };
    
<methods>public boolean add(U) ,public boolean addAll(Collection<? extends U>) ,public void clear() ,public boolean contains(java.lang.Object) ,public boolean containsAll(Collection<?>) ,public boolean isEmpty() ,public abstract Iterator<U> iterator() ,public boolean remove(java.lang.Object) ,public boolean removeAll(Collection<?>) ,public boolean retainAll(Collection<?>) ,public abstract int size() ,public java.lang.Object[] toArray() ,public T[] toArray(T[]) ,public java.lang.String toString() <variables>