public static boolean isKeyExist(Map<String,Object> map , String key) {
boolean res = false;
Iterator keys = map.keySet().iterator();
while(keys.hasNext()) {
String keyParam = (String)keys.next();
if(key.equals(keyParam)) {
res = true;
}
}
return res;
}
java map 中判断 key 是否存在
最新推荐文章于 2023-12-23 15:59:55 发布