本文整理汇总了Java中org.apache.commons.collections4.map.MultiValueMap.containsKey方法的典型用法代码示例。如果您正苦于以下问题:Java MultiValueMap.containsKey方法的具体用法?Java MultiValueMap.containsKey怎么用?Java MultiValueMap.containsKey使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.commons.collections4.map.MultiValueMap
的用法示例。
在下文中一共展示了MultiValueMap.containsKey方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: printOrigin
import org.apache.commons.collections4.map.MultiValueMap; //导入方法依赖的package包/类
protected String printOrigin(Integer nodeId, MultiValueMap<Integer, Integer> origin) {
if (mapping == null){
makeMapping(origin);
}
if (origin.containsKey(nodeId)){
Integer index = origin.getCollection(nodeId).iterator().next();
// String index = (String) origin.getCollection(nodeIDstring).iterator().next();
if (index>=mapping.length){
makeMapping(origin);
}
return String.valueOf(mapping[index]);
// return mapping[Integer.parseInt(index)];
}
return null;
}
示例2: containsOriginNode
import org.apache.commons.collections4.map.MultiValueMap; //导入方法依赖的package包/类
protected boolean containsOriginNode(Integer nodeID, MultiValueMap<Integer, Integer> origin)
{
if (origin == null)
{
return false;
}
return origin.containsKey(nodeID);
}
示例3: getOrigin
import org.apache.commons.collections4.map.MultiValueMap; //导入方法依赖的package包/类
@SuppressWarnings("unchecked")
protected Collection<Integer> getOrigin(Integer nodeID, MultiValueMap<Integer, Integer> origin)
{
if (origin == null)
{
return null;
}
if (origin.containsKey(nodeID))
{
return origin.getCollection(nodeID);
}
return null;
}
示例4: getLowestOrigin
import org.apache.commons.collections4.map.MultiValueMap; //导入方法依赖的package包/类
@SuppressWarnings("unchecked")
protected Integer getLowestOrigin(Integer nodeID, MultiValueMap<Integer, Integer> origin)
{
Integer lowest = 9999999;
if (origin.containsKey(nodeID))
{
Collection<Integer> nodeIds = origin.getCollection(nodeID);
if(nodeIds.isEmpty())
return -1;
for(Integer id : nodeIds)
{
if (id < lowest)
{
lowest = id;
}
}
// Iterator<Integer> nodeids = origin.getCollection(nodeID).iterator();
// if (origin.getCollection(nodeID).isEmpty())
// {
// return -1;
//// return "-1";
// //return null;
// }
// while (nodeids.hasNext())
// {
// Integer id = nodeids.next();
//// int id = Integer.parseInt((String) nodeids.next());
// if (id < lowest)
// {
// lowest = id;
// }
// }
}
else
{
return null;
}
return lowest;
// return Integer.toString(lowest);
}
示例5: findCodes
import org.apache.commons.collections4.map.MultiValueMap; //导入方法依赖的package包/类
private static List<Code> findCodes(boolean forValueSet, MultiValueMap<MultiKey<String>, Code> codes, MultiKey<String> codeKey) {
return ((forValueSet && codes.containsKey(codeKey)) ? new ArrayList<>(codes.getCollection(codeKey)) : Collections.emptyList());
}
示例6: elemIntegrationPointHasRole
import org.apache.commons.collections4.map.MultiValueMap; //导入方法依赖的package包/类
/**
* Checks whether the integration point on the elementary tree has a role.
* @param tree an ElementaryStringTree with potential roles attached to it
* @param rolesPerNode a Map of nodes with their roles
* @param integrationPointId integration point id
* @param ipIdOffset the node id offset. This is the highest node id of the prefix tree.
* @return
*/
private boolean elemIntegrationPointHasRole(ElementaryStringTree tree, MultiValueMap<Integer, Role> rolesPerNode, int integrationPointId)
{
return tree.hasRoles() && rolesPerNode.containsKey(integrationPointId);
}