本文整理汇总了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());
}
}
示例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);
}
示例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);
}
示例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;
}
示例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;
}