All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.virtdata.api.config.MutableConfigModel Maven / Gradle / Ivy

Go to download

Statistical sampling library for use in virtualdataset libraries, based on apache commons math 4

There is a newer version: 2.12.15
Show newest version
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);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy