io.github.sinri.keel.poi.excel.entity.KeelSheetTemplatedMatrix Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of Keel Show documentation
Show all versions of Keel Show documentation
A website framework with VERT.X for ex-PHP-ers, exactly Ark Framework Users.
The newest version!
package io.github.sinri.keel.poi.excel.entity;
import javax.annotation.Nonnull;
import java.util.List;
/**
* @since 3.0.13
* @since 3.0.18 Finished Technical Preview.
*/
public interface KeelSheetTemplatedMatrix {
static KeelSheetTemplatedMatrix create(@Nonnull KeelSheetMatrixRowTemplate template) {
return new KeelSheetTemplatedMatrixImpl(template);
}
KeelSheetMatrixRowTemplate getTemplate();
KeelSheetMatrixTemplatedRow getRow(int index);
List getRows();
List> getRawRows();
KeelSheetTemplatedMatrix addRawRow(@Nonnull List rawRow);
default KeelSheetTemplatedMatrix addRawRows(@Nonnull List> rawRows) {
rawRows.forEach(this::addRawRow);
return this;
}
default KeelSheetMatrix transformToMatrix() {
KeelSheetMatrix keelSheetMatrix = new KeelSheetMatrix();
keelSheetMatrix.setHeaderRow(getTemplate().getColumnNames());
keelSheetMatrix.addRows(getRawRows());
return keelSheetMatrix;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy