io.deephaven.engine.util.ColumnsSpecHelper Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of deephaven-engine-table Show documentation
Show all versions of deephaven-engine-table Show documentation
Engine Table: Implementation and closely-coupled utilities
/**
* 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