All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.tvd12.reflections.util.TransformedIterator Maven / Gradle / Ivy

The newest version!
package com.tvd12.reflections.util;

import java.util.Iterator;

abstract class TransformedIterator implements Iterator {
	final Iterator backingIterator;

	TransformedIterator(Iterator 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