Object类型转list

            Map<String, Object> params = eventNode.getParams();
                    if (params != null) {
                        List<String> batchIdList = new ArrayList<>();
                        if (params.get("batchIdList") instanceof ArrayList<?>) {
                            for (Object o : (List<?>) params.get("batchIdList")) {
                                batchIdList.add((String) o);
                            }
                        }
                    }

 

posted @ 2020-12-23 17:00  二次元的程序猿  阅读(730)  评论(0编辑  收藏  举报