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

io.deephaven.engine.util.ColumnsSpecHelper Maven / Gradle / Ivy

There is a newer version: 0.37.1
Show newest version
/**
 * Copyright (c) 2016-2022 Deephaven Data Labs and Patent Pending
 */
package io.deephaven.engine.util;

import java.util.ArrayList;

/**
 * Helper class to support easier to read in-line column definitions. You can obtain the array arguments to feed the
 * buildWriter methods in TableWriterFactory.
 */
public class ColumnsSpecHelper {

    private final ArrayList names = new ArrayList<>();
    private final ArrayList types = new ArrayList<>();

    public ColumnsSpecHelper add(final String name, final Class type) {
        names.add(name);
        types.add(type);
        return this;
    }

    public String[] getColumnNames() {
        return names.toArray(new String[0]);
    }

    public Class[] getTypes() {
        return types.toArray(new Class[0]);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy