From 002516bd03b2ea3f731c8139c9a5f716902ab702 Mon Sep 17 00:00:00 2001 From: Ben Culkin Date: Tue, 7 Apr 2020 21:03:53 -0400 Subject: Finish remove utils.data utils.data now lives in the esodata project; not in this one --- .../java/bjc/utils/data/TransformIterator.java | 46 ---------------------- 1 file changed, 46 deletions(-) delete mode 100644 base/src/main/java/bjc/utils/data/TransformIterator.java (limited to 'base/src/main/java/bjc/utils/data/TransformIterator.java') diff --git a/base/src/main/java/bjc/utils/data/TransformIterator.java b/base/src/main/java/bjc/utils/data/TransformIterator.java deleted file mode 100644 index 9ce3b20..0000000 --- a/base/src/main/java/bjc/utils/data/TransformIterator.java +++ /dev/null @@ -1,46 +0,0 @@ -package bjc.utils.data; - -import java.util.Iterator; -import java.util.function.Function; - -/** - * An iterator that transforms values from one type to another. - * - * @author EVE - * - * @param - * The source iterator type. - * - * @param - * The destination iterator type. - */ -public class TransformIterator implements Iterator { - /* Our source of values. */ - private final Iterator source; - /* Transform function. */ - private final Function transform; - - /** - * Create a new transform iterator. - * - * @param source - * The source iterator to use. - * - * @param transform - * The transform to apply. - */ - public TransformIterator(final Iterator source, final Function transform) { - this.source = source; - this.transform = transform; - } - - @Override - public boolean hasNext() { - return source.hasNext(); - } - - @Override - public D next() { - return transform.apply(source.next()); - } -} -- cgit v1.2.3