List of usage examples for com.google.common.collect ImmutableMap copyOf
public static <K, V> ImmutableMap<K, V> copyOf(Iterable<? extends Entry<? extends K, ? extends V>> entries)
From source file:com.b2international.commons.dynamic.DynamicMapImpl.java
@SuppressWarnings("unchecked") public DynamicMapImpl(Map<?, ?> map) { valueMap = ImmutableMap.copyOf((Map<String, DynamicValue>) Maps .transformValues(Maps.filterKeys(map, stringKeyFilter), valueConverter)); }
From source file:org.elasticsearch.script.NativeScriptEngineService.java
@Inject public NativeScriptEngineService(Settings settings, Map<String, NativeScriptFactory> scripts) { super(settings); this.scripts = ImmutableMap.copyOf(scripts); }
From source file:org.trancecode.xproc.ImmutablePipelineContext.java
ImmutablePipelineContext(final Map<String, Object> properties) { super(ImmutableMap.copyOf(properties)); executor = TcSuppliers.memoize(executor); inputResolver = TcSuppliers.memoize(inputResolver); outputResolver = TcSuppliers.memoize(outputResolver); pipelineLibrary = TcSuppliers.memoize(pipelineLibrary); processor = TcSuppliers.memoize(processor); stepProcessors = TcSuppliers.memoize(stepProcessors); uriResolver = TcSuppliers.memoize(uriResolver); }
From source file:com.qubole.qds.sdk.java.details.RequestDetails.java
public RequestDetails(Object entity, Method method, Map<String, String> queryParams) { this.entity = entity; this.method = method; this.queryParams = (queryParams != null) ? ImmutableMap.copyOf(queryParams) : null; }
From source file:org.pentaho.caching.api.PentahoCacheTemplateConfiguration.java
public PentahoCacheTemplateConfiguration(String description, Map<String, String> properties, PentahoCacheManager cacheManager) { this.description = description; this.properties = ImmutableMap.copyOf(properties); this.cacheManager = cacheManager; }
From source file:com.spotify.helios.master.HostMatcher.java
public HostMatcher(final Map<String, Map<String, String>> hostsAndLabels) { this.hostsAndLabels = ImmutableMap.copyOf(checkNotNull(hostsAndLabels, "hostsAndLabels")); }
From source file:org.ambraproject.rhino.model.ingest.ArticleItemInput.java
public ArticleItemInput(Doi doi, Map<String, ArticleFileInput> files, String type) { this.doi = Objects.requireNonNull(doi); this.files = ImmutableMap.copyOf(files); this.type = Objects.requireNonNull(type); }
From source file:com.tkmtwo.interpolate.MappingInterpolatorCallback.java
/** * Creates a new interpolator callback using the * supplied mappings.//from w w w . ja v a2 s . c o m * * @param m a map from which to copy entries */ public MappingInterpolatorCallback(Map<String, T> m) { map = ImmutableMap.copyOf(checkNotNull(m)); }
From source file:org.seedstack.seed.el.internal.ELModule.java
@Override protected void configure() { bind(ELService.class).to(ELServiceInternal.class); bind(ELContextBuilder.class).to(ELContextBuilderImpl.class); for (Class<ELHandler> elHandlerClass : elMap.values()) { bind(elHandlerClass);//ww w .jav a2 s. c o m } // bind the map of annotation, elHandler bind(MAP_TYPE_LITERAL).toInstance(ImmutableMap.copyOf(elMap)); }
From source file:org.sonar.ce.taskprocessor.CeTaskProcessorRepositoryImpl.java
private static Map<String, CeTaskProcessor> indexTaskProcessors(CeTaskProcessor[] taskProcessors) { Multimap<String, CeTaskProcessor> permissiveIndex = buildPermissiveCeTaskProcessorIndex(taskProcessors); checkUniqueHandlerPerCeTaskType(permissiveIndex); return ImmutableMap.copyOf( Maps.transformValues(permissiveIndex.asMap(), CeTaskProcessorCollectionToFirstElement.INSTANCE)); }