List of usage examples for java.util Collections unmodifiableCollection
public static <T> Collection<T> unmodifiableCollection(Collection<? extends T> c)
From source file:com.microsoft.azure.management.containerinstance.implementation.ContainerGroupImpl.java
@Override public Collection<Port> externalPorts() { if (this.inner().ipAddress() != null && this.inner().ipAddress().ports() != null) { return Collections.unmodifiableCollection(this.inner().ipAddress().ports()); } else {//from w w w . j a v a 2s .com return null; } }
From source file:me.st28.flexseries.flexlib.plugin.FlexPlugin.java
public final Collection<FlexModule> getModules() { return Collections.unmodifiableCollection(modules.values()); }
From source file:de.uniba.wiai.kinf.pw.projects.lillytab.reasoner.tbox.AssertedRBox.java
@Override public Collection<RoleProperty> getRoleProperties(R role) { final Collection<RoleProperty> properties = _rolePropertyMap.get(role); if (properties != null) { return Collections.unmodifiableCollection(properties); } else {/* ww w . j a v a 2s . c o m*/ return null; } }
From source file:de.ailis.threedee.assets.Assets.java
/** * Returns all loaded textures.//from w w w .ja v a 2 s. com * * @return The loaded textures. Never null. May be empty. */ public Collection<Animation> getAnimations() { return Collections.unmodifiableCollection(this.animations.values()); }
From source file:com.netflix.simianarmy.janitor.AbstractJanitor.java
/** gets the resources that failed to be cleaned in the last run of the Janitor. */ public Collection<Resource> getFailedToCleanResources() { return Collections.unmodifiableCollection(failedToCleanResources); }
From source file:com.ibm.jaggr.core.impl.transport.AbstractHttpTransport.java
/** * Returns the requested locales as a collection of locale strings * * @param request the request object/* www . j a v a 2s .co m*/ * @return the locale strings */ protected Collection<String> getRequestedLocales(HttpServletRequest request) { final String sourceMethod = "getRequestedLocales"; //$NON-NLS-1$ boolean isTraceLogging = log.isLoggable(Level.FINER); if (isTraceLogging) { log.entering(AbstractHttpTransport.class.getName(), sourceMethod, new Object[] { request.getQueryString() }); } String[] locales; String sLocales = getParameter(request, REQUESTEDLOCALES_REQPARAMS); if (sLocales != null) { locales = sLocales.split(","); //$NON-NLS-1$ } else { locales = new String[0]; } Collection<String> result = Collections.unmodifiableCollection(Arrays.asList(locales)); if (isTraceLogging) { log.exiting(AbstractHttpTransport.class.getName(), sourceMethod, result); } return result; }
From source file:com.vmware.identity.idm.server.config.IdmServerConfig.java
private void loadSystemDomainProperties(IRegistryAdapter regAdapter, IRegistryKey rootKey) { _systemDomainIdentityStoreType = IdentityStoreType.IDENTITY_STORE_TYPE_VMWARE_DIRECTORY; ArrayList<URI> list = new ArrayList<URI>(); URI uri = _useSSL/* w w w. j av a 2s. c o m*/ ? DirectoryStoreProtocol.LDAPS.getUri(_directoryConfigStoreHost, _directoryConfigStorePort) : DirectoryStoreProtocol.LDAP.getUri(_directoryConfigStoreHost, _directoryConfigStorePort); if (null != uri) { list.add(uri); } else { throw new IllegalStateException(String.format("cannot get valid uri for host:port [%s, %d]", _directoryConfigStoreHost, _directoryConfigStorePort)); } _systemDomainConnectionInfo = Collections.unmodifiableCollection(list); _systemDomainSearchTimeout = regAdapter.getIntValue(rootKey, CONFIG_ROOT_KEY, CONFIG_SYSTEM_DOMAIN_SEARCH_TIMEOUT, true); Collection<String> attributeList = regAdapter.getMultiStringValue(rootKey, CONFIG_ROOT_KEY, CONFIG_SYSTEM_DOMAIN_ATTRIBUTES_MAP, false); Map<String, String> attrMap = new HashMap<String, String>(); Map.Entry<String, String> pair = null; for (String attr : attributeList) { if (!ServerUtils.isNullOrEmpty(attr)) { pair = ServerUtils.getAttributeKeyValueFromString(attr); attrMap.put(pair.getKey(), pair.getValue()); } } if (!attrMap.isEmpty()) { _systemDomainAttributesMap = Collections.unmodifiableMap(attrMap); } this._isServiceProviderSystemDomainInBackCompatMode = false; this._serviceProviderSystemDomainAlias = null; this._serviceProviderSystemDomainUserAliases = new HashMap<String, String>(1); Integer val = regAdapter.getIntValue(rootKey, CONFIG_ROOT_KEY, CONFIG_SP_SYSTEM_DOMAIN_BACKCOMPAT_MODE, true); if (val != null) { this._isServiceProviderSystemDomainInBackCompatMode = (val.intValue() != 0); } if (this._isServiceProviderSystemDomainInBackCompatMode) { this._serviceProviderSystemDomainAlias = regAdapter.getStringValue(rootKey, CONFIG_ROOT_KEY, CONFIG_SP_SYSTEM_DOMAIN_ALIAS, true); if (ServerUtils.isNullOrEmpty(this._serviceProviderSystemDomainAlias) == false) { Collection<String> usersMapList = regAdapter.getMultiStringValue(rootKey, CONFIG_ROOT_KEY, CONFIG_SP_SYSTEM_DOMAIN_USER_ALIASES, true); if (usersMapList != null && usersMapList.size() > 0) { String[] userFromTo = null; for (String mapping : usersMapList) { if (!ServerUtils.isNullOrEmpty(mapping)) { userFromTo = mapping.split(UPN_SEP_STR); if ((userFromTo.length == 2) && (ServerUtils.isNullOrEmpty(userFromTo[0]) == false) && (ServerUtils.isNullOrEmpty(userFromTo[1]) == false)) { this._serviceProviderSystemDomainUserAliases.put(userFromTo[0], userFromTo[1]); } } } } } } this._serviceProviderSystemDomainUserAliases = Collections .unmodifiableMap(this._serviceProviderSystemDomainUserAliases); }
From source file:net.floodlightcontroller.devicemanager.internal.DeviceManagerImpl.java
@Override public Collection<? extends IDevice> getAllDevices() { //TODO - values() return Collections.unmodifiableCollection(deviceMap.values()); }
From source file:architecture.ee.plugin.impl.PluginManagerImpl.java
public Collection<Plugin> getPlugins() { return Collections.unmodifiableCollection(plugins.values()); }
From source file:com.microsoft.azure.management.containerinstance.implementation.ContainerGroupImpl.java
@Override public Collection<String> imageRegistryServers() { return Collections.unmodifiableCollection(this.imageRegistryServers); }