package timing;
import java.util.Set;
import java.util.HashSet;
import java.util.Random;

public class SetContainsTimer extends Timer {
	Set<Integer> set = new HashSet<>();
	Integer i = 0;
	int size;
	Random random = new Random(0);

	public SetContainsTimer(int size) {
		this.size = size;
		for (int i = 0; i < size; ++i) {
			set.add(i);
		}
	}

	@Override
	public void action() {
		set.contains(random.nextInt(2 * size));
	}

}
