package com.qmth.teachcloud.common.util.excel.convertor.impl;

import org.apache.poi.ss.usermodel.Cell;

import com.qmth.teachcloud.common.util.excel.convertor.ValueConvertor;
import com.qmth.teachcloud.common.util.excel.model.FieldParam;

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(String.valueOf(object));
    }
}
