pInfo.setAttentionPerson(mapAttention.getOrDefault(employeeInfo.getPersonId(),null)==null?false:true);
image.png
pInfo.setAttentionPerson(mapAttention.containsKey(employeeInfo.getPersonId()));
image.png
pInfo.setAttentionPerson(mapAttention.getOrDefault(employeeInfo.getPersonId(),null)==null?false:true);
image.png
pInfo.setAttentionPerson(mapAttention.containsKey(employeeInfo.getPersonId()));
image.png
本文标题:优化map判断
本文链接:https://www.haomeiwen.com/subject/mbjdiktx.html
网友评论