本文整理汇总了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;
}
示例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();
}
示例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();
}
示例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();
}
}
示例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());
}
示例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);
}
示例7: MapLinkingValidator
import com.google.common.collect.ImmutableMultimap; //导入方法依赖的package包/类
private MapLinkingValidator(final Multimap<Symbol, Symbol> linkableTypes) {
this.linkableTypes = ImmutableMultimap.copyOf(linkableTypes);
}
示例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);
}
示例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);
}
示例10: getBerichtmodel
import com.google.common.collect.ImmutableMultimap; //导入方法依赖的package包/类
public Multimap<MetaModel, MetaModel> getBerichtmodel() {
return ImmutableMultimap.copyOf(berichtmodel);
}
示例11: getActieMap
import com.google.common.collect.ImmutableMultimap; //导入方法依赖的package包/类
/**
* @return actieId op Actie map
*/
Multimap<Long, BRPActie> getActieMap() {
return ImmutableMultimap.copyOf(actieMap);
}
示例12: ListenerMapGeneration
import com.google.common.collect.ImmutableMultimap; //导入方法依赖的package包/类
ListenerMapGeneration(final Multimap<Class<? extends Notification>, NotificationListenerRegistration<?>> listeners) {
this.typeToListeners = ImmutableMultimap.copyOf(listeners);
}