com.tvd12.reflections.util.TransformedIterator Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of reflections Show documentation
Show all versions of reflections Show documentation
Reflections - a Java runtime metadata analysis
The newest version!
package com.tvd12.reflections.util;
import java.util.Iterator;
abstract class TransformedIterator implements Iterator {
final Iterator extends F> backingIterator;
TransformedIterator(Iterator extends F> backingIterator) {
this.backingIterator = backingIterator;
}
abstract T transform(F from);
@Override
public final boolean hasNext() {
return backingIterator.hasNext();
}
@Override
public final T next() {
return transform(backingIterator.next());
}
@Override
public final void remove() {
backingIterator.remove();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy