com.g2forge.alexandria.java.adt.MapIterator Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ax-java Show documentation
Show all versions of ax-java Show documentation
Standard Java library and the basis of the ${alexandria.name} project.
package com.g2forge.alexandria.java.adt;
import java.util.Iterator;
import java.util.function.Function;
import lombok.RequiredArgsConstructor;
@RequiredArgsConstructor
public class MapIterator implements Iterator {
protected final Iterator extends I> iterator;
protected final Function super I, ? extends O> function;
@Override
public boolean hasNext() {
return iterator.hasNext();
}
@Override
public O next() {
return function.apply(iterator.next());
}
@Override
public void remove() {
iterator.remove();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy