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


Java Multimap.containsKey方法代码示例

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


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

示例1: addToResultsTopDown

import com.google.common.collect.Multimap; //导入方法依赖的package包/类
private void addToResultsTopDown(Multimap<Long, T> parent2Nodes, Long parentId)
{
	if( !parent2Nodes.containsKey(parentId) )
	{
		return;
	}

	Collection<T> nodes = parent2Nodes.get(parentId);
	results.addAll(nodes);

	for( T node : nodes )
	{
		// Recurse on child nodes
		addToResultsTopDown(parent2Nodes, node.getId());
	}
}
 
开发者ID:equella,项目名称:Equella,代码行数:17,代码来源:SingleTreeNodeFileImportHandler.java

示例2: createManagedProperty

import com.google.common.collect.Multimap; //导入方法依赖的package包/类
private static <T> ManagedProperty<T> createManagedProperty(StructBindingExtractionContext<?> extractionContext, String propertyName, ModelSchema<T> propertySchema, Multimap<PropertyAccessorType, StructMethodBinding> accessors) {
    boolean writable = accessors.containsKey(SETTER);
    boolean declaredAsUnmanaged = isDeclaredAsHavingUnmanagedType(accessors.get(GET_GETTER))
        || isDeclaredAsHavingUnmanagedType(accessors.get(IS_GETTER));
    boolean internal = !extractionContext.getPublicSchema().hasProperty(propertyName);

    validateManagedProperty(extractionContext, propertyName, propertySchema, writable, declaredAsUnmanaged);

    return new ManagedProperty<T>(propertyName, propertySchema.getType(), writable, declaredAsUnmanaged, internal);
}
 
开发者ID:lxxlxx888,项目名称:Reer,代码行数:11,代码来源:DefaultStructBindingsStore.java

示例3: bepaalTeBehoudenIdentificerendeRecordsVanHoofdpersoon

import com.google.common.collect.Multimap; //导入方法依赖的package包/类
private void bepaalTeBehoudenIdentificerendeRecordsVanHoofdpersoon(final Berichtgegevens berichtgegevens,
                                                                   final Multimap<GroepElement, MetaRecord> groepDeltaMap,
                                                                   final Set<MetaRecord> teBehoudenRecords, final ModelIndex modelIndex,
                                                                   final GroepElement groepElement) {
    if (!groepDeltaMap.containsKey(groepElement)) {
        //geen delta records gevonden voor identificerende groep
        //het actuele record moet nu behouden blijven
        final Set<MetaGroep> groepSet = modelIndex.geefGroepenVanElement(groepElement);
        if (!groepSet.isEmpty()) {
            final MetaGroep groep = Iterables.getOnlyElement(groepSet);
            berichtgegevens.getPersoonslijst().getActueleRecord(groep)
                    .filter(berichtgegevens::isGeautoriseerd).ifPresent(teBehoudenRecords::add);
        }
    }
}
 
开发者ID:MinBZK,项目名称:OperatieBRP,代码行数:16,代码来源:MutatieleveringBehoudIdentificerendeGegevensServiceImpl.java

示例4: getTotalRowCountAsString

import com.google.common.collect.Multimap; //导入方法依赖的package包/类
/**
 * Get the total of rows retrieved by all queries executed.
 * @param columnsForEachSqlStatement
 * @param valuesForEachColumn
 * @return
 */
static String getTotalRowCountAsString(final Multimap<String, String> columnsForEachSqlStatement,
		final Multimap<String, String> valuesForEachColumn) {
	int count = 0;
	if (columnsForEachSqlStatement == null || valuesForEachColumn == null) {
		return Integer.toString(count);
	}
	for (final String result : columnsForEachSqlStatement.keySet()) {
		final String firstColumn = columnsForEachSqlStatement.get(result).iterator().next();
		if (valuesForEachColumn.containsKey(firstColumn)) {
			count += valuesForEachColumn.get(firstColumn).size();
		}
	}
	return Integer.toString(count);
}
 
开发者ID:Neotys-Labs,项目名称:Database-Advanced-Actions,代码行数:21,代码来源:Sqlactionutils.java

示例5: getDamage

import com.google.common.collect.Multimap; //导入方法依赖的package包/类
public float getDamage()
{
	Multimap<String, AttributeModifier> modifiersMap = this.getRenderStack().getAttributeModifiers(EntityEquipmentSlot.MAINHAND);
	double ret = 1;
	if (modifiersMap.containsKey(SharedMonsterAttributes.ATTACK_DAMAGE.getName()))
	{
		for (AttributeModifier mod : modifiersMap.get(SharedMonsterAttributes.ATTACK_DAMAGE.getName()))
		{
			ret = mod.getOperation() == 0 ? ret + mod.getAmount() : ret * mod.getAmount();
		}
	}
	
	return (float) ret;
}
 
开发者ID:V0idWa1k3r,项目名称:ExPetrum,代码行数:15,代码来源:EntityThrownWeapon.java

示例6: toXml

import com.google.common.collect.Multimap; //导入方法依赖的package包/类
public Element toXml(Set<ObjectName> instancesToMap, Set<ObjectName> configBeans, Document document,
        final EnumResolver enumResolver) {
    Element root = XmlUtil.createElement(document, XmlMappingConstants.DATA_KEY, Optional.<String>absent());

    Element modulesElement = XmlUtil.createElement(document, XmlMappingConstants.MODULES_KEY,
            Optional.of(XmlMappingConstants.URN_OPENDAYLIGHT_PARAMS_XML_NS_YANG_CONTROLLER_CONFIG));
    root.appendChild(modulesElement);

    Map<String, Multimap<String, ObjectName>> moduleToRuntimeInstance = mapInstancesToModules(instancesToMap);
    Map<String, Map<String, Collection<ObjectName>>> moduleToConfigInstance = Config.getMappedInstances(configBeans,
            moduleConfigs);

    for (String localNamespace : moduleConfigs.keySet()) {

        Map<String, Collection<ObjectName>> instanceToMbe = moduleToConfigInstance.get(localNamespace);

        for (String moduleName : moduleConfigs.get(localNamespace).keySet()) {
            Multimap<String, ObjectName> instanceToRbe = moduleToRuntimeInstance.get(moduleName);

            for (ObjectName instanceON : instanceToMbe.get(moduleName)) {
                String instanceName = ObjectNameUtil.getInstanceName(instanceON);

                Element runtimeXml;
                ModuleConfig moduleConfig = moduleConfigs.get(localNamespace).get(moduleName);
                if (instanceToRbe == null || !instanceToRbe.containsKey(instanceName)) {
                    runtimeXml = moduleConfig.toXml(instanceON, document, localNamespace, enumResolver);
                } else {
                    ModuleRuntime moduleRuntime = moduleRuntimes.get(localNamespace).get(moduleName);
                    runtimeXml = moduleRuntime.toXml(localNamespace, instanceToRbe.get(instanceName), document,
                            moduleConfig, instanceON, enumResolver);
                }
                modulesElement.appendChild(runtimeXml);
            }

        }
    }
    return root;
}
 
开发者ID:hashsdn,项目名称:hashsdn-controller,代码行数:39,代码来源:Runtime.java


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