List of usage examples for java.util Collections unmodifiableMap
public static <K, V> Map<K, V> unmodifiableMap(Map<? extends K, ? extends V> m)
From source file:com.vangent.hieos.services.xds.bridge.mapper.ContentParserConfig.java
/** * Method description//from www.j a v a 2 s. c o m * * * @return */ public Map<String, Map<String, String>> getStaticValues() { return Collections.unmodifiableMap(staticValues); }
From source file:com.smartitengineering.dao.impl.hbase.spi.impl.SchemaInfoProviderImpl.java
public Map<String, FilterConfig> getFilterConfigs() { return Collections.unmodifiableMap(filterConfigs); }
From source file:com.amazonaws.internal.config.InternalConfig.java
/** * Returns an immutable map by merging the override signer configuration * into the default signer configuration for the given theme. * * @param defaults/* w w w . j av a 2s . c om*/ * default signer configuration * @param override * signer configurations overrides * @param theme * used for message logging. eg region, service, region+service */ private Map<String, SignerConfig> mergeSignerMap(JsonIndex<SignerConfigJsonHelper, SignerConfig>[] defaults, JsonIndex<SignerConfigJsonHelper, SignerConfig>[] overrides, String theme) { Map<String, SignerConfig> map = buildSignerMap(defaults, theme); Map<String, SignerConfig> mapOverride = buildSignerMap(overrides, theme); map.putAll(mapOverride); return Collections.unmodifiableMap(map); }
From source file:com.orange.servicebroker.staticcreds.stories.get_syslog_drain_url.CreateLogDrainServiceBindingTest.java
@Test public void create_service_binding_with_static_syslog_drain_url_set_at_service_level() throws Exception { given().syslog_drain_url_set_in_catalog( service_broker_properties_with_syslog_drain_url_at_service_level_with_requires_field_set()); when().cloud_controller_requests_to_create_a_service_instance_binding_for_plan_id("dev-id"); then().it_should_be_returned_with_syslog_drain_url( new CreateServiceInstanceAppBindingResponse().withSyslogDrainUrl("syslog://log.example.com:5000") .withCredentials(Collections.unmodifiableMap( Stream.of(new AbstractMap.SimpleEntry<>("URI", "http://my-api.org")) .collect(Collectors.toMap((e) -> e.getKey(), (e) -> e.getValue()))))); }
From source file:ch.puzzle.itc.mobiliar.business.security.control.PermissionService.java
Map<String, List<RestrictionDTO>> getDeployableRoles() { boolean isReload = permissionRepository.isReloadDeployableRoleList(); if (deployableRolesWithRestrictions == null || isReload) { Map<String, List<RestrictionDTO>> tmpDeployableRolesWithRestrictions = new HashMap<>(); for (RoleEntity role : permissionRepository.getDeployableRoles()) { addPermission(tmpDeployableRolesWithRestrictions, role); }//from w ww . ja v a 2 s . com deployableRolesWithRestrictions = Collections.unmodifiableMap(tmpDeployableRolesWithRestrictions); if (isReload) { permissionRepository.setReloadDeployableRoleList(false); } } return deployableRolesWithRestrictions; }
From source file:org.n52.io.response.dataset.AbstractValue.java
@JsonAnyGetter public Map<String, Object> getParameters() { return parameters != null ? Collections.unmodifiableMap(parameters) : null; }
From source file:com.linecorp.armeria.server.docs.ServiceInfo.java
private ServiceInfo(String name, List<FunctionInfo> functions, Collection<ClassInfo> classes, Iterable<EndpointInfo> endpoints, @Nullable String docString) { this.name = requireNonNull(name, "name"); requireNonNull(functions, "functions"); requireNonNull(classes, "classes"); requireNonNull(endpoints, "endpoints"); final Map<String, FunctionInfo> functions0 = new TreeMap<>(); for (FunctionInfo function : functions) { functions0.put(function.name(), function); }/*w ww . j av a2 s . co m*/ this.functions = Collections.unmodifiableMap(functions0); final Map<String, ClassInfo> classes0 = new TreeMap<>(); for (ClassInfo classInfo : classes) { classes0.put(classInfo.name(), classInfo); } this.classes = Collections.unmodifiableMap(classes0); final Map<String, EndpointInfo> endpoints0 = new TreeMap<>(); for (EndpointInfo i : endpoints) { endpoints0.put(i.hostnamePattern() + ':' + i.path(), i); } this.endpoints = Collections.unmodifiableMap(endpoints0); this.docString = docString; }
From source file:org.codehaus.griffon.commons.DefaultGriffonContext.java
protected Map<Object, Object> loadMetadata() { final Properties meta = new Properties(); Resource r = new ClassPathResource(PROJECT_META_FILE, getClassLoader()); try {//ww w . j ava 2 s . c o m meta.load(r.getInputStream()); } catch (IOException e) { StackTraceUtils.deepSanitize(e); log.warn("No application metadata file found at " + r); } if (System.getProperty(Environment.KEY) != null) { meta.setProperty(Environment.KEY, System.getProperty(Environment.KEY)); } return Collections.unmodifiableMap(meta); }
From source file:bear.core.BearProject.java
public BearProject withMap(Map<Object, Object> variables) { this.variables = Collections.unmodifiableMap(variables); return this; }
From source file:com.graphhopper.jsprit.core.util.UnassignedJobReasonTracker.java
/** * Returns an unmodifiable map of constraint names (simple name of constraint) and reason code pairs. * * @return/*from w ww . jav a 2 s. com*/ */ public Map<String, Integer> getFailedConstraintNamesToCode() { return Collections.unmodifiableMap(failedConstraintNamesToCode); }