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


Java ImmutableMultimap.copyOf方法代码示例

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


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

示例1: build

import com.google.common.collect.ImmutableMultimap; //导入方法依赖的package包/类
/**
 * Bouwt het MetaObject.
 * @param parentObject het parent meta object
 * @return het MetaObject
 */
MetaObject build(final MetaObject parentObject) {
    final MetaObject gebouwdObject = new MetaObject();
    gebouwdObject.parentObject = parentObject;
    gebouwdObject.objectsleutel = objectsleutel;
    gebouwdObject.objectElement = objectElement;

    final Multimap<ObjectElement, MetaObject> tempObjectenMap = HashMultimap.create();
    for (final Builder builder : objectBuilderList) {
        final MetaObject object = builder.build(gebouwdObject);
        tempObjectenMap.put(object.getObjectElement(), object);
    }
    gebouwdObject.elementObjectMap = ImmutableMultimap.copyOf(tempObjectenMap);
    gebouwdObject.objecten = ImmutableSet.copyOf(tempObjectenMap.values());

    final Map<GroepElement, MetaGroep> tempGroepenMap = Maps.newHashMap();
    for (final MetaGroep.Builder groepBuilder : groepBuilderList) {
        final MetaGroep groep = groepBuilder.build(gebouwdObject);
        tempGroepenMap.put(groep.getGroepElement(), groep);
    }
    gebouwdObject.elementGroepMap = ImmutableMap.copyOf(tempGroepenMap);
    gebouwdObject.groepen = ImmutableSet.copyOf(tempGroepenMap.values());
    return gebouwdObject;
}
 
开发者ID:MinBZK,项目名称:OperatieBRP,代码行数:29,代码来源:MetaObject.java

示例2: CorefAnnotation

import com.google.common.collect.ImmutableMultimap; //导入方法依赖的package包/类
private CorefAnnotation(final Symbol docId, final Multimap<Integer, KBPString> idToCASes,
    final Map<KBPString, Integer> CASesToIDs, final Set<KBPString> unannotated) {
  this.docId = checkNotNull(docId);
  this.idToCASes = ImmutableMultimap.copyOf(idToCASes);
  this.CASesToIDs = ImmutableMap.copyOf(CASesToIDs);
  this.unannotated = ImmutableSet.copyOf(unannotated);
  checkConsistency();
}
 
开发者ID:isi-nlp,项目名称:tac-kbp-eal,代码行数:9,代码来源:CorefAnnotation.java

示例3: AnswerAlignment

import com.google.common.collect.ImmutableMultimap; //导入方法依赖的package包/类
private AnswerAlignment(
    final Multimap<Answerable, LeftAnswer> equivalenceClassesToLeftItems,
    final Multimap<Answerable, RightAnswer> equivalenceClassesToRightItems) {
  this.ecToLeft = ImmutableMultimap.copyOf(equivalenceClassesToLeftItems);
  this.ecToRight = ImmutableMultimap.copyOf(equivalenceClassesToRightItems);

  // build set of equivalence classes
  final ImmutableSet.Builder<Answerable> classesBuilder = ImmutableSet.builder();
  classesBuilder.addAll(equivalenceClassesToLeftItems.keySet());
  classesBuilder.addAll(equivalenceClassesToRightItems.keySet());
  this.answerables = classesBuilder.build();
}
 
开发者ID:isi-nlp,项目名称:tac-kbp-eal,代码行数:13,代码来源:AnswerAlignment.java

示例4: getChannelMap

import com.google.common.collect.ImmutableMultimap; //导入方法依赖的package包/类
/**
 * Get a copy of all {@link StoredClientChannel}s
 */
public Multimap<Sha256Hash, StoredClientChannel> getChannelMap() {
    lock.lock();
    try {
        return ImmutableMultimap.copyOf(mapChannels);
    } finally {
        lock.unlock();
    }
}
 
开发者ID:creativechain,项目名称:creacoinj,代码行数:12,代码来源:StoredPaymentChannelClientStates.java

示例5: VirtualChestInventory

import com.google.common.collect.ImmutableMultimap; //导入方法依赖的package包/类
VirtualChestInventory(VirtualChestPlugin plugin, VirtualChestInventoryBuilder builder)
{
    this.plugin = plugin;
    this.logger = plugin.getLogger();
    this.actionIntervalManager = plugin.getActionIntervalManager();

    this.title = builder.title;
    this.height = builder.height;
    this.triggerItem = builder.triggerItem;
    this.openActionCommand = builder.openActionCommand;
    this.closeActionCommand = builder.closeActionCommand;
    this.updateIntervalTick = builder.updateIntervalTick;
    this.items = ImmutableMultimap.copyOf(builder.items);
    this.acceptableActionIntervalTick = builder.actionIntervalTick.map(OptionalInt::of).orElse(OptionalInt.empty());
}
 
开发者ID:ustc-zzzz,项目名称:VirtualChest,代码行数:16,代码来源:VirtualChestInventory.java

示例6: TypeAndRoleValidator

import com.google.common.collect.ImmutableMultimap; //导入方法依赖的package包/类
private TypeAndRoleValidator(Iterable<Symbol> alwaysValidRoles,
    Multimap<Symbol, Symbol> validRoles) {
  this.alwaysValidRoles = ImmutableSet.copyOf(alwaysValidRoles);
  this.validRoles = ImmutableMultimap.copyOf(validRoles);
}
 
开发者ID:isi-nlp,项目名称:tac-kbp-eal,代码行数:6,代码来源:TypeAndRoleValidator.java

示例7: MapLinkingValidator

import com.google.common.collect.ImmutableMultimap; //导入方法依赖的package包/类
private MapLinkingValidator(final Multimap<Symbol, Symbol> linkableTypes) {
  this.linkableTypes = ImmutableMultimap.copyOf(linkableTypes);
}
 
开发者ID:isi-nlp,项目名称:tac-kbp-eal,代码行数:4,代码来源:LinkingValidators.java

示例8: AnswerKeyEquivalenceClasses

import com.google.common.collect.ImmutableMultimap; //导入方法依赖的package包/类
private AnswerKeyEquivalenceClasses(final AnswerKey answerKey,
    final Multimap<Answerable, AssessedResponse> equivalenceClasses) {
  this.answerKey = checkNotNull(answerKey);
  this.equivalenceClasses = ImmutableMultimap.copyOf(equivalenceClasses);
}
 
开发者ID:isi-nlp,项目名称:tac-kbp-eal,代码行数:6,代码来源:AnswerKeyEquivalenceClasses.java

示例9: SystemOutputEquivalenceClasses

import com.google.common.collect.ImmutableMultimap; //导入方法依赖的package包/类
private SystemOutputEquivalenceClasses(final ArgumentOutput argumentOutput,
    final Multimap<Answerable, Response> equivalenceClasses) {
  this.argumentOutput = checkNotNull(argumentOutput);
  this.equivalenceClasses = ImmutableMultimap.copyOf(equivalenceClasses);
}
 
开发者ID:isi-nlp,项目名称:tac-kbp-eal,代码行数:6,代码来源:SystemOutputEquivalenceClasses.java

示例10: getBerichtmodel

import com.google.common.collect.ImmutableMultimap; //导入方法依赖的package包/类
public Multimap<MetaModel, MetaModel> getBerichtmodel() {
    return ImmutableMultimap.copyOf(berichtmodel);
}
 
开发者ID:MinBZK,项目名称:OperatieBRP,代码行数:4,代码来源:Berichtgegevens.java

示例11: getActieMap

import com.google.common.collect.ImmutableMultimap; //导入方法依赖的package包/类
/**
 * @return actieId op Actie map
 */
Multimap<Long, BRPActie> getActieMap() {
    return ImmutableMultimap.copyOf(actieMap);
}
 
开发者ID:MinBZK,项目名称:OperatieBRP,代码行数:7,代码来源:PersoonBlobber.java

示例12: ListenerMapGeneration

import com.google.common.collect.ImmutableMultimap; //导入方法依赖的package包/类
ListenerMapGeneration(final Multimap<Class<? extends Notification>, NotificationListenerRegistration<?>> listeners) {
    this.typeToListeners = ImmutableMultimap.copyOf(listeners);
}
 
开发者ID:hashsdn,项目名称:hashsdn-controller,代码行数:4,代码来源:ListenerMapGeneration.java


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