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

io.github.sinri.keel.poi.excel.entity.KeelSheetTemplatedMatrix Maven / Gradle / Ivy

Go to download

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