當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。