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

com.g2forge.alexandria.java.adt.MapIterator Maven / Gradle / Ivy

There is a newer version: 0.0.18
Show newest version
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 iterator;

	protected final Function 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