List of usage examples for java.util Collections unmodifiableCollection
public static <T> Collection<T> unmodifiableCollection(Collection<? extends T> c)
From source file:com.ibm.jaggr.service.impl.transport.AbstractHttpTransport.java
/** * Returns the requested locales as a collection of locale strings * //from ww w .j a v a 2s . c o m * @param request the request object * @return the locale strings */ protected Collection<String> getRequestedLocales(HttpServletRequest request) { String[] locales; String sLocales = getParameter(request, REQUESTEDLOCALES_REQPARAMS); if (sLocales != null) { locales = sLocales.split(","); //$NON-NLS-1$ } else { locales = new String[0]; } return Collections.unmodifiableCollection(Arrays.asList(locales)); }
From source file:architecture.ee.plugin.impl.PluginManagerImpl.java
public Collection<ClassLoader> getClassLoaders() { ArrayList<ClassLoader> list = new ArrayList<ClassLoader>(); for (PluginClassLoader loader : classloaders.values()) { list.add(loader.getClassLoader()); }//from w ww . j av a 2 s . c om return Collections.unmodifiableCollection(list); }
From source file:com.smartitengineering.cms.spi.impl.workspace.WorkspaceServiceImpl.java
@Override public Collection<ContentType> getContentDefintions(WorkspaceId workspaceId) { return Collections.unmodifiableCollection(getContentTypeReader().getByWorkspace(workspaceId)); }
From source file:com.haulmont.cuba.web.gui.components.WebAbstractOptionsField.java
@SuppressWarnings({ "unchecked" }) protected <T> T wrapAsCollection(Object o) { if (isMultiSelect()) { if (o instanceof Collection) { return (T) Collections.unmodifiableCollection((Collection) o); } else if (o != null) { return (T) Collections.singleton(o); } else {//from w w w. jav a 2 s. co m return (T) Collections.emptySet(); } } else { return (T) o; } }
From source file:de.skuzzle.polly.http.internal.HttpServerImpl.java
@Override public Collection<HttpSession> getSessions() { final Collection<HttpSession> result = new ArrayList<>(); switch (this.getSessionType()) { case SESSION_TYPE_COOKIE: case SESSION_TYPE_GET: synchronized (this.idToSession) { result.addAll(this.idToSession.values()); }/*from www . j a v a 2s . c o m*/ break; case SESSION_TYPE_IP: synchronized (this.ipToSession) { result.addAll(this.ipToSession.values()); } } return Collections.unmodifiableCollection(result); }
From source file:de.btobastian.javacord.entities.impl.ImplServer.java
@Override public Collection<Channel> getChannels() { return Collections.unmodifiableCollection(channels.values()); }
From source file:de.btobastian.javacord.entities.impl.ImplServer.java
@Override public Collection<VoiceChannel> getVoiceChannels() { return Collections.unmodifiableCollection(voiceChannels.values()); }
From source file:de.xirp.settings.SettingsPage.java
/** * Gets a list of all the options of this page in the order in * which they were added to the page.//from w ww . j av a 2s . c om * * @return the unmodifiable list of options */ public Collection<Option> getOptions() { return Collections.unmodifiableCollection(optionOrder); }
From source file:net.greghaines.jesque.worker.WorkerImpl.java
/** * {@inheritDoc}// w w w. j a va2 s . co m */ @Override public Collection<String> getQueues() { return Collections.unmodifiableCollection(this.queueNames); }
From source file:aiai.ai.station.StationTaskService.java
public Collection<StationTask> findAll() { return Collections.unmodifiableCollection(map.values()); }