package common;

import java.util.Collections;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Set;

/**
 * <p>A TestIterator meant for exploring a space of combinations. As such, removing elements from
 * the backing collection should have an effect on subsequent results from next(). This class
 * provides convenience methods for excluding certain elements of the backing collection from
 * combinations returned from next().</p>
 * @author fiveham
 * @author fiveham
 *
 * @param <T>
 * @param <T>@param <T>
 */
public class IsoIterator<T> extends TestIterator<List<T>> {
	
	protected final Set<T> exclude;
  
    /**
     * <p>Constructs an IsoIterator wrapping the specified Iterator and having no tests.</p>
     * @param wrappedIterator the Iterator that supplies this IsoIterator with elements to test and
     * contingently reduce
     */
	public IsoIterator(Iterator<List<T>> wrappedIterator) {
		super(wrappedIterator);
		this.exclude = new HashSet<>();
		addTest((list) -> Collections.disjoint(list, this.exclude));
	}
}

@@ -14,64 +14,8 @@
 n;%0A%0A
-import java.util.Collections;%0Aimport java.util.HashSet;%0A
 impo
@@ -37,16 +37,16 @@
 erator;%0A
+
 import j
@@ -63,30 +63,8 @@
 ist;
-%0Aimport java.util.Set;
 %0A%0A/*
@@ -542,44 +542,8 @@
 %7B%0A%09%0A
-%09protected final Set%3CT%3E exclude;%0A  %0A
     
@@ -831,16 +831,16 @@
 ator) %7B%0A
+
 %09%09super(
@@ -861,105 +861,8 @@
 r);%0A
-%09%09this.exclude = new HashSet%3C%3E();%0A%09%09addTest((list) -%3E Collections.disjoint(list, this.exclude));%0A
 %09%7D%0A%7D

remove unused exclude set