Example usage for com.google.common.collect ImmutableMap copyOf

List of usage examples for com.google.common.collect ImmutableMap copyOf

Introduction

In this page you can find the example usage for com.google.common.collect ImmutableMap copyOf.

Prototype

public static <K, V> ImmutableMap<K, V> copyOf(Iterable<? extends Entry<? extends K, ? extends V>> entries) 

Source Link

Usage

From source file:org.brocalc.domain.ProductBrokerageNode.java

public ProductBrokerageNode(Map<Product, BrokerageScheduleComponent> productMap) {
    this.productMap = ImmutableMap.copyOf(productMap);
}

From source file:io.macgyver.plugin.chat.ChatBot.java

public Map<String, ChatBotCommand> getCommands() {
    return ImmutableMap.copyOf(commandMap);
}

From source file:org.t3as.ner.conll2003.NerClassification.java

public NerClassification(final String nerToken, final EntityClass type, final int phraseStartIndex,
        final Map<EntityClass, Double> scores) {
    this.nerToken = nerToken;
    this.type = type;
    this.phraseStartIndex = phraseStartIndex;
    this.scores = ImmutableMap.copyOf(scores);
}

From source file:com.isotrol.impe3.pms.core.obj.StartedComponents.java

/**
 * Constructor.
 * @param components Instantiated components.
 */
StartedComponents(Map<UUID, StartedModule<?>> components) {
    this.components = ImmutableMap.copyOf(components);
}

From source file:org.gradle.internal.fingerprint.impl.DefaultFileCollectionFingerprinterRegistry.java

public DefaultFileCollectionFingerprinterRegistry(Collection<FileCollectionFingerprinter> fingerprinters) {
    this.fingerprinters = ImmutableMap.copyOf(Maps.uniqueIndex(fingerprinters,
            new Function<FileCollectionFingerprinter, Class<? extends FileNormalizer>>() {
                @Override//from   w w  w.jav  a2 s . c o  m
                public Class<? extends FileNormalizer> apply(FileCollectionFingerprinter fingerprinter) {
                    return fingerprinter.getRegisteredType();
                }
            }));
}

From source file:io.prestosql.metadata.InternalTable.java

public InternalTable(Map<String, Integer> columnIndexes, Iterable<Page> pages) {
    this.columnIndexes = ImmutableMap.copyOf(requireNonNull(columnIndexes, "columnIndexes is null"));
    this.pages = ImmutableList.copyOf(requireNonNull(pages, "pages is null"));
}

From source file:org.apache.bigtop.datagenerators.bigpetstore.generators.transaction.CustomerInventory.java

public CustomerInventory(Map<String, ProductCategoryInventory> productCategoryInventories) {
    this.productCategoryInventories = ImmutableMap.copyOf(productCategoryInventories);
}

From source file:com.facebook.presto.example.ExampleConnectorFactory.java

public ExampleConnectorFactory(TypeManager typeManager, Map<String, String> optionalConfig) {
    this.typeManager = requireNonNull(typeManager, "typeManager is null");
    this.optionalConfig = ImmutableMap.copyOf(requireNonNull(optionalConfig, "optionalConfig is null"));
}

From source file:models.SensorConfigurations.java

public Map<String, String> configs() {
    return ImmutableMap.copyOf(configs);
}

From source file:com.mastfrog.scamper.MessageHandlerMapping.java

private MessageHandlerMapping(Map<MessageType, Class<? extends MessageHandler<?, ?>>> map) {
    this.map = ImmutableMap.copyOf(map);
}