org.swiftboot.sheet.meta.MetaMap Maven / Gradle / Ivy
package org.swiftboot.sheet.meta;
import org.apache.commons.collections4.ListUtils;
import java.util.*;
import java.util.function.Consumer;
import java.util.function.Function;
/**
* @author swiftech
*/
public class MetaMap {
/**
* mapping from sheet id to meta items in the order added.
*/
Map> data = new LinkedHashMap<>();
Map> handlers = new HashMap<>();
/**
* to indicate that extract images during parsing Excel sheet, for import only.
*/
boolean withImages = false;
Map> imageConverters = new HashMap<>();
public void setSheetHandler(SheetId id, Consumer extends SheetInfo> handler) {
handlers.put(id, handler);
}
public Consumer extends SheetInfo> getSheetHandler(SheetId id) {
return handlers.get(id);
}
public boolean isWithImages() {
return withImages;
}
public void setWithImages(boolean withImages) {
this.withImages = withImages;
}
public void setImageConverter(SheetId id,Function
© 2015 - 2024 Weber Informatics LLC | Privacy Policy