io.virtdata.api.config.MutableConfigModel Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of virtdata-lib-curves4 Show documentation
Show all versions of virtdata-lib-curves4 Show documentation
Statistical sampling library for use in virtualdataset libraries, based on apache commons math 4
package io.virtdata.api.config;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
public class MutableConfigModel implements ConfigModel {
private final List elements = new ArrayList<>();
public MutableConfigModel() {}
public MutableConfigModel add(String name, Class> clazz) {
add(new ConfigModel.Element(name, clazz));
return this;
}
private void add(ConfigModel.Element element) {
this.elements.add(element);
}
public ConfigModel asReadOnly() {
return this;
}
@Override
public List getElements() {
return Collections.unmodifiableList(elements);
}
}