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


Java Multimaps.unmodifiableMultimap方法代码示例

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


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

示例1: generateHeaderCache

import com.google.common.collect.Multimaps; //导入方法依赖的package包/类
/**
 * Generates the header cache.
 */
private synchronized void generateHeaderCache() {
	if (headerCache != null) {
		// already generated cache
		return;
	}
	
	// generate the multimap
	Multimap<String, String> headers = HashMultimap.create();
	
	if (base.headers != null) {
		for (Header header : base.headers) {
			headers.putAll(header.name, header.value);
		}
	}
	
	headerCache = Multimaps.unmodifiableMultimap(headers);
}
 
开发者ID:Kixeye,项目名称:chassis,代码行数:21,代码来源:WebSocketEnvelope.java

示例2: indexByRow

import com.google.common.collect.Multimaps; //导入方法依赖的package包/类
/**
 * Indexes annotation records converted from the CSV file by row.
 *
 * The returned multimap uses: key=annotated_name, values=[annotations_names]
 *
 * This allows to merge rows sharing the same key, and for all column values
 * to be unique for a given line.
 *
 * @param records the CsvAnnotationLines parsed from file
 * @return the annotation values keyed by annotated name (eg. dataset name)
 */
public static Multimap<String, String> indexByRow(Collection<CsvAnnotationLine> records) {

    Multimap<String, String> result = HashMultimap.create();

    if (null != records) {

        for (CsvAnnotationLine line : records) {
            String rowKey = line.getAnnotatedName();
            Collection<String> columnValues = line.getAnnotationsValues();

            if (null != rowKey && null != columnValues) {
                result.putAll(rowKey, columnValues);
            } else {
                LOG.warn("WARNING - Null annotated name or values : {} - {}",
                         rowKey, columnValues);
            }
        }

    }

    return Multimaps.unmodifiableMultimap(result);
}
 
开发者ID:imagopole,项目名称:omero-csv-tools,代码行数:34,代码来源:AnnotationsUtil.java

示例3: OnderzoekIndex

import com.google.common.collect.Multimaps; //导入方法依赖的package包/类
/**
 * Constructor.
 * @param modelIndex modelindex van een gegeven metamodel
 */
OnderzoekIndex(final ModelIndex modelIndex) {
    this.modelIndex = modelIndex;
    bouwGegevenInOnderzoekenMap();

    final Indexer indexer = new Indexer();
    indexer.visit(modelIndex.getMetaObject());
    gegevensInOnderzoek = Multimaps.unmodifiableMultimap(indexer.gegevensInOnderzoekTemp);
    objectenInOnderzoek = Collections.unmodifiableMap(indexer.objectenInOnderzoekTemp);
}
 
开发者ID:MinBZK,项目名称:OperatieBRP,代码行数:14,代码来源:OnderzoekIndex.java

示例4: bouwGegevenInOnderzoekenMap

import com.google.common.collect.Multimaps; //导入方法依赖的package包/类
private void bouwGegevenInOnderzoekenMap() {
    final Multimap<ElementObject, Onderzoekbundel> tempElementNaarGegevenInOnderzoekMap = LinkedHashMultimap.create();
    final Set<MetaGroep> groepen = modelIndex.geefGroepenVanElement(GEGEVENINONDERZOEK_IDENTITEIT);
    for (final MetaGroep metaGroep : groepen) {
        for (final MetaRecord record : metaGroep.getRecords()) {
            final Onderzoekbundel onderzoekbundel = new Onderzoekbundel(record);

            tempElementNaarGegevenInOnderzoekMap.put(onderzoekbundel.getElement(), onderzoekbundel);
        }
    }
    elementNaarGegevenInOnderzoekMap = Multimaps.unmodifiableMultimap(tempElementNaarGegevenInOnderzoekMap);
}
 
开发者ID:MinBZK,项目名称:OperatieBRP,代码行数:13,代码来源:OnderzoekIndex.java

示例5: fromIterable

import com.google.common.collect.Multimaps; //导入方法依赖的package包/类
/**
 * Creates a {@link MultimapView} from the provided values. The provided {@link Coder} is used
 * to guarantee structural equality for keys instead of assuming Java object equality.
 */
public static <K, V> MultimapView<K, V> fromIterable(
    Coder<K> keyCoder, Iterable<KV<K, V>> values) {
  // We specifically use an array list multimap to allow for:
  //  * null keys
  //  * null values
  //  * duplicate values
  Multimap<Object, Object> multimap = ArrayListMultimap.create();
  for (KV<K, V> value : values) {
    multimap.put(keyCoder.structuralValue(value.getKey()), value.getValue());
  }
  return new InMemoryMultimapSideInputView(keyCoder, Multimaps.unmodifiableMultimap(multimap));
}
 
开发者ID:apache,项目名称:beam,代码行数:17,代码来源:InMemoryMultimapSideInputView.java

示例6: inverse

import com.google.common.collect.Multimaps; //导入方法依赖的package包/类
public Multimap<V, K> inverse()
{
    return Multimaps.unmodifiableMultimap(reverseMap);
}
 
开发者ID:Netflix,项目名称:sstable-adaptor,代码行数:5,代码来源:BiMultiValMap.java

示例7: getTaskProcessorMap

import com.google.common.collect.Multimaps; //导入方法依赖的package包/类
public Multimap<String, Pair<Class<?>, TaskProcessor>> getTaskProcessorMap() {
    return Multimaps.unmodifiableMultimap(taskProcessorMap);
}
 
开发者ID:EsikAntony,项目名称:camunda-task-dispatcher,代码行数:4,代码来源:TaskProcessorRegistryImpl.java

示例8: getPackageToBlamedResources

import com.google.common.collect.Multimaps; //导入方法依赖的package包/类
/** Must first call {@link #blame}. */
public Multimap<PackageChunk, ResourceEntry> getPackageToBlamedResources() {
  return Multimaps.unmodifiableMultimap(packageToBlame);
}
 
开发者ID:google,项目名称:android-arscblamer,代码行数:5,代码来源:ArscBlamer.java

示例9: getTypeEntryToBlamedResources

import com.google.common.collect.Multimaps; //导入方法依赖的package包/类
/** Must first call {@link #blame}. */
public Multimap<TypeChunk.Entry, ResourceEntry> getTypeEntryToBlamedResources() {
  return Multimaps.unmodifiableMultimap(typeEntryToBlame);
}
 
开发者ID:google,项目名称:android-arscblamer,代码行数:5,代码来源:ArscBlamer.java

示例10: getMessagesByElement

import com.google.common.collect.Multimaps; //导入方法依赖的package包/类
public Multimap<String, String> getMessagesByElement() {
  return Multimaps.unmodifiableMultimap(messagesByElement);
}
 
开发者ID:google,项目名称:FreeBuilder,代码行数:4,代码来源:FakeMessager.java

示例11: inverse

import com.google.common.collect.Multimaps; //导入方法依赖的package包/类
/**
 * @return an unmodifiable inverse view that will stay in sync
 */
public Multimap<V, K> inverse() {
  return Multimaps.unmodifiableMultimap(mapInv);
}
 
开发者ID:swift-lang,项目名称:swift-t,代码行数:7,代码来源:TwoWayMap.java

示例12: getMetadata

import com.google.common.collect.Multimaps; //导入方法依赖的package包/类
/**
 * @return the metadata contained.
 */
public Multimap<String, MetadataValue> getMetadata() {
  return Multimaps.unmodifiableMultimap(metadata);
}
 
开发者ID:jenkinsci,项目名称:google-metadata-plugin,代码行数:7,代码来源:MetadataContainer.java

示例13: getModules

import com.google.common.collect.Multimaps; //导入方法依赖的package包/类
/**
 * Returns an unmodifiable map of all the registered module classes and their instances in this container.
 *
 * @return a map of classes and their module instances
 */
public Multimap<Class<? extends Module>, Module> getModules() {
    return Multimaps.unmodifiableMultimap(this.modules);
}
 
开发者ID:BlurEngine,项目名称:Blur,代码行数:9,代码来源:ModuleManager.java

示例14: getAccessorAdditionalInfo

import com.google.common.collect.Multimaps; //导入方法依赖的package包/类
/**
 * Returns the {@link Multimap} of JavaBean getter method names that access
 * persistable properties, mapped to additional property names that the
 * session {@link SPPersister} requires to convert the accessor's returned
 * value into a basic persistable type. The order of this {@link Multimap}
 * is guaranteed.
 * 
 * @see Accessor#additionalInfo()
 */
public Multimap<String, String> getAccessorAdditionalInfo() {
	return Multimaps.unmodifiableMultimap(accessorAdditionalInfo);
}
 
开发者ID:SQLPower,项目名称:sqlpower-library,代码行数:13,代码来源:SPClassVisitor.java

示例15: getMutatorExtraParameters

import com.google.common.collect.Multimaps; //导入方法依赖的package包/类
/**
 * Returns the {@link Multimap} of JavaBean setter method names that mutate
 * persistable properties, mapped to {@link MutatorParameterObject}s that
 * contain values for an {@link SPPersister} to use. The order of this
 * {@link Multimap} is guaranteed.
 */
public Multimap<String, MutatorParameterObject> getMutatorExtraParameters() {
	return Multimaps.unmodifiableMultimap(mutatorExtraParameters);
}
 
开发者ID:SQLPower,项目名称:sqlpower-library,代码行数:10,代码来源:SPClassVisitor.java


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