StringUtils.containsOnly(“sss”,“ss,ddd,sssss,tawer”)
------ 返回true ,是按字符匹配第一个是不是被第二个串包含
for (Map.Entry<String, PolicyVO> policyVOEntry : policyMap.entrySet()) {
String orgCode = policyVOEntry.getValue().getEntitlementList().get(0).getAppList().get(0).getOrgCode();
if(StringUtils.containsOnly(AdminPermissionManager.getInstance().getPermissionConfigMap().get(operator.getOperatorID()).getAdminOrgCodes(),orgCode));
policyMapResult.put(policyVOEntry.getValue().getName(),policyVOEntry.getValue());
}
String orgCode = policyVOEntry.getValue().getEntitlementList().get(0).getAppList().get(0).getOrgCode();
if(StringUtils.containsOnly(AdminPermissionManager.getInstance().getPermissionConfigMap().get(operator.getOperatorID()).getAdminOrgCodes(),orgCode));
policyMapResult.put(policyVOEntry.getValue().getName(),policyVOEntry.getValue());
}
-------遍历MAP
entrySet
Set<Map.Entry<K,V>> entrySet()
- 返回此映射中包含的映射关系的 set 视图。返回的 set 中的每个元素都是一个
Map.Entry
。该 set 受映射支持,所以对映射的改变可在此 set 中反映出来,反之亦然。如果修改映射的同时正在对该 set 进行迭代(除了通过迭代器自己的remove
操作,或者通过在迭代器返回的映射项上执行setValue
操作外),则迭代结果是不明确的。set 支持通过Iterator.remove
、Set.remove
、removeAll
、retainAll
和clear
操作实现元素移除,即从映射中移除相应的映射关系。它不支持add
或addAll
操作。 - 返回:
- 此映射中包含的映射关系的 set 视图。