先判断Map是否为空,不为空的话采集对应的value.toString值返回,源码为:
public static String getString(Map<? super K, ?> map, K key) {
if (map != null) {
Object answer = map.get(key);
if (answer != null) {
return answer.toString();
}
}
return null;
}
先判断Map是否为空,不为空的话采集对应的value.toString值返回,源码为:
public static String getString(Map<? super K, ?> map, K key) {
if (map != null) {
Object answer = map.get(key);
if (answer != null) {
return answer.toString();
}
}
return null;
}