net.sf.doolin.tabular.support.AbstractTabularModel Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of doolin-tabular Show documentation
Show all versions of doolin-tabular Show documentation
This Doolin GUI module is an extension that allows writing
tabular data (CSV, Excel).
The newest version!
package net.sf.doolin.tabular.support;
import java.util.ArrayList;
import java.util.List;
import net.sf.doolin.tabular.model.TabularColumn;
import net.sf.doolin.tabular.model.TabularModel;
/**
* This class defines an abstract common implementation for a tabular model.
*
* @author Damien Coraboeuf
*
* @param
* Type of data for the rows.
*/
public abstract class AbstractTabularModel implements TabularModel {
private List> columns = new ArrayList>();
/**
* Adds a column to the model
*
* @param column
* Column to add
*/
public void addColumn(TabularColumn column) {
this.columns.add(column);
}
@Override
public TabularColumn getColumn(int index) {
return this.columns.get(index);
}
@Override
public int getColumnCount() {
return this.columns.size();
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy