package com.qmth.boot.tools.excel.convertor.impl;

import com.qmth.boot.tools.excel.convertor.ValueConvertor;
import com.qmth.boot.tools.excel.model.FieldParam;
import org.apache.poi.ss.usermodel.Cell;

public class LongConvertor implements ValueConvertor<Long> {

    public static final LongConvertor instance = new LongConvertor();

    @Override
    public Long parse(String value, FieldParam param) throws Exception {
        return Long.parseLong(value);
    }

    @Override
    public void format(Long object, FieldParam param, Cell cell) throws Exception {
        cell.setCellValue(object);
    }
}
