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

com.swak.excel.metadata.ExcelSheetData Maven / Gradle / Ivy

The newest version!
package com.swak.excel.metadata;

import com.google.common.collect.Maps;
import com.swak.common.dto.base.DTO;

import java.util.Collections;
import java.util.List;
import java.util.Map;
import java.util.Objects;


public class ExcelSheetData implements DTO {
    private Map,SheetRowData> allSheetRow = Maps.newHashMap();

    public  List getSheetRows(Class clazz) {
        SheetRowData sheetRowData = allSheetRow.get(clazz);
        if(Objects.nonNull(sheetRowData)) {
            return (List) sheetRowData.getExcelRows();
        }
       return Collections.emptyList();
    }

    public  void  addSheetRows(SheetRowData sheetRow) {
        allSheetRow.putIfAbsent(sheetRow.getHead(),sheetRow);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy