package cn.cslg.pas.common.utils.handler;

import cn.cslg.pas.common.utils.StringUtils;

import java.util.List;

public class IncoPatInventorAddressHandler implements IProcessData {
    public IncoPatInventorAddressHandler() {
    }

    @Override
    public Object processData(Object data, Object code) {
        List<String> splitStr = StringUtils.changeStringToString(data.toString().replaceAll(" ", ""), ";");
        if (code.toString().equals("1")) {
            return splitStr;
        } else if (code.toString().equals("2")) {
            return splitStr.get(0);
        }
        return null;
    }
}
