当前位置: 首页>>代码示例>>Java>>正文


Java MultiValueMap.keySet方法代码示例

本文整理汇总了Java中org.apache.commons.collections4.map.MultiValueMap.keySet方法的典型用法代码示例。如果您正苦于以下问题:Java MultiValueMap.keySet方法的具体用法?Java MultiValueMap.keySet怎么用?Java MultiValueMap.keySet使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.apache.commons.collections4.map.MultiValueMap的用法示例。


在下文中一共展示了MultiValueMap.keySet方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: obtainLanguagesCacheTrans

import org.apache.commons.collections4.map.MultiValueMap; //导入方法依赖的package包/类
private void obtainLanguagesCacheTrans(List<LanguagesOutput> outputList,
		List<LanguagesInput> inputList) {

	if ((LanguagesInput.searchEngine(inputList, Engine.CACHETRANS.toString())) == -1) {
		return;
	}

	MultiValueMap langs = Cachetrans.getLanguages();

	for (Object s : langs.keySet()) {
		for (Object t : langs.getCollection(s)) {
			addLanguagePair(outputList, s.toString(), t.toString(),
					Engine.CACHETRANS.toString());
		}
	}

	return;
}
 
开发者ID:transducens,项目名称:forecat,代码行数:19,代码来源:LanguagesServerSide.java

示例2: printEntriesWithComplexRolesStats

import org.apache.commons.collections4.map.MultiValueMap; //导入方法依赖的package包/类
private void printEntriesWithComplexRolesStats(MultiValueMap<String, LexiconEntryWithRoles> unlexEntriesWithNormWordsAsKeys)
{
    for(String key : unlexEntriesWithNormWordsAsKeys.keySet())
    {
        StringBuilder treesStr = new StringBuilder();
        for(LexiconEntryWithRoles tree : unlexEntriesWithNormWordsAsKeys.getCollection(key))
        {
            if(tree.getRoles().size() > 0)
            {   
                boolean treeMoreThanOneRole = false;
                StringBuilder treeStr = new StringBuilder("\n");
                for(RoleSignature sig : tree.getRoles())
                {
                    treeStr.append(sig).append(", ");
                    if(sig.numOfRoles() > 1)
                    {
                        treeMoreThanOneRole = true;
                    } // if
                } // for
                if(treeMoreThanOneRole && tree.getRoles().size() > 1)
                    treesStr.append("\t").append(treeStr);
            } // if
        } // for
        if(treesStr.length() > 0)
            System.out.println(key + treesStr);
    }
}
 
开发者ID:sinantie,项目名称:PLTAG,代码行数:28,代码来源:SemanticLexicon.java

示例3: addIncompleteDependencies

import org.apache.commons.collections4.map.MultiValueMap; //导入方法依赖的package包/类
private void addIncompleteDependencies(ElementaryStringTree tree, short offset, boolean isShadowTree, boolean isRelation, 
        MultiValueMap<Integer, Role> rolesPerNode, Node prefixTreeNode, String[] words, String[] origPosTags, 
        String operation, boolean direction, int timestamp)//, Set<DepNode> excludeIntegPoints)
{              
    for(Integer nodeId : rolesPerNode.keySet())
    {
        addIncompleteDependency(nodeId, tree, offset, isShadowTree, isRelation, rolesPerNode.getCollection(nodeId), prefixTreeNode, 
                words, origPosTags, operation, direction, timestamp);
    }
}
 
开发者ID:sinantie,项目名称:PLTAG,代码行数:11,代码来源:DepTreeState.java

示例4: convertAbstractConnectionToLinkContractBase

import org.apache.commons.collections4.map.MultiValueMap; //导入方法依赖的package包/类
private LinkContractBase<?> convertAbstractConnectionToLinkContractBase(AbstractConnection connection, LinkContractBase<?> linkContractBase) {
	Assert.notNull(connection);

	if (connection.getPermissions().size() <= 0) {
		throw new RuntimeException("Something has to be shared.");
	}

	MultiValueMap<String, String> permissions = connection.getPermissions();

	for (String targetXDIAddress : permissions.keySet()) {

		// there is some json serialization issue and instead of String I'm getting ArrayList<String>
		Object listTemp = permissions.iterator(targetXDIAddress).next();
		@SuppressWarnings("unchecked")
		List<String> list = (List<String>) listTemp;

		for (String p : list) {
			XDIAddress permissionAddress = null;
			if ("get".equals(p))  permissionAddress = XDILinkContractConstants.XDI_ADD_GET;
			else if ("set".equals(p))  permissionAddress = XDILinkContractConstants.XDI_ADD_SET;
			else if ("del".equals(p))  permissionAddress = XDILinkContractConstants.XDI_ADD_DEL;
			else if ("all".equals(p))  permissionAddress = XDILinkContractConstants.XDI_ADD_ALL;
			else continue;

			linkContractBase.setPermissionTargetXDIAddress(permissionAddress, XDIAddress.create(targetXDIAddress));
		}
	}

	return linkContractBase;
}
 
开发者ID:projectdanube,项目名称:xdi2-manager,代码行数:31,代码来源:XdiModelConverter.java

示例5: makeLexTrees

import org.apache.commons.collections4.map.MultiValueMap; //导入方法依赖的package包/类
/**
 * Converts a MultiValueMap with String values to one with StringTree values.
 * @param treetype 
 * 
 * @param MultiValueMap lexString
 * @return MultiValueMap lexTree
 */
@SuppressWarnings("unchecked")
private MultiValueMap makeLexTrees(MultiValueMap lexString, String treetype)
{
    MultiValueMap<String, ElementaryStringTree> lexTree = new MultiValueMap();
    Set<String> keys = lexString.keySet();
    for (String key : keys)
    {
        Collection<String> values = lexString.getCollection(key);
        HashMap<String, ElementaryStringTree> treelist = new HashMap<String, ElementaryStringTree>();
        for (String treeString : values)
        {
            ElementaryStringTree tree = makeToStringTreeOld(treeString, treetype);
            if (tree == null)
            {
                continue;
            }
            String POSword = tree.getPOStagged(tree.getRoot()).trim();
            if (key.equals("prediction: "))
            {
                POSword = key;
            }
            // for lexentries for "put up" etc, add three times into Map: as "put up", "put" and "up".
            String[] words = POSword.split("\t");
            ElementaryStringTree sametree = null;
            if (!treelist.containsKey(POSword + "@@" + tree.toString()))
            {
                lexTree.put(POSword, tree);
            }
            treelist.put(POSword + "@@" + tree.toString(), tree);
            if (words.length > 1)
            {
                for (String word : words)
                {
                    if (sametree == null)
                    {
                        lexTree.put(word, tree);
                    }
                }
            }
        }
    }
    return lexTree;
}
 
开发者ID:sinantie,项目名称:PLTAG,代码行数:51,代码来源:Lexicon.java


注:本文中的org.apache.commons.collections4.map.MultiValueMap.keySet方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。