Factor.java
package com.github.dakusui.jcunitx.factorspace;
import java.util.List;
import static java.util.Arrays.asList;
public interface Factor {
static Factor create(final String name, final Object[] args) {
return new Factor() {
private final List<Object> levels = asList(args);
@Override
public String getName() {
return name;
}
@Override
public List<Object> getLevels() {
return levels;
}
@Override
public String toString() {
return String.format("%s:%s", name, levels);
}
};
}
String getName();
List<Object> getLevels();
}