map遍历删除

List<Object> orderManageList = cacheService.values(key);
        Iterator<Object> it=orderManageList.iterator();
        while(it.hasNext()){
            Object a=it.next();
            if (a instanceof Map) {
                Map<String, Object> item = (Map<String, Object>) a;
                String type = (String) item.get("type");
                if (!type.equals(STRATEY_MANUAL_ORDER)) {
                    it.remove();
                }
            }
        }

猜你喜欢

转载自www.cnblogs.com/hpwd/p/11451525.html
今日推荐