package edu.mit.streamjit.test;

import com.google.common.collect.ImmutableList;
import com.google.common.collect.Lists;
import java.util.List;

/**
 * A skeletal Benchmark implementation that manages the name and inputs but
 * leaves instantiate() abstract.
 * @author Jeffrey Bosboom <jeffreybosboom@gmail.com>
 * @since 8/27/2013
 */
public abstract class AbstractBenchmark implements Benchmark {
	private final String name;
	private final ImmutableList<Dataset> inputs;
	public AbstractBenchmark(String name, Dataset firstInput, Dataset... moreInputs) {
		this.name = name;
		this.inputs = ImmutableList.copyOf(Lists.asList(firstInput, moreInputs));
	}
	@Override
	public final List<Dataset> inputs() {
		return inputs;
	}
	@Override
	public final String toString() {
		return name;
	}
}

@@ -646,24 +646,411 @@
 nputs));%0A%09%7D%0A
+%09public AbstractBenchmark(Dataset firstInput, Dataset... moreInputs) %7B%0A%09%09if (!getClass().getSimpleName().isEmpty())%0A%09%09%09this.name = getClass().getSimpleName();%0A%09%09else %7B%0A%09%09%09String binaryName = getClass().getName();%0A%09%09%09this.name = binaryName.substring(binaryName.lastIndexOf('.')+1, binaryName.length()-1);%0A%09%09%7D%0A%09%09this.inputs = ImmutableList.copyOf(Lists.asList(firstInput, moreInputs));%0A%09%7D%0A
 %09@Override%0A%09

AbstractBenchmark can infer its name