List of usage examples for java.util Collections unmodifiableCollection
public static <T> Collection<T> unmodifiableCollection(Collection<? extends T> c)
From source file:de.btobastian.javacord.ImplDiscordAPI.java
@Override public Collection<VoiceChannel> getVoiceChannels() { Collection<VoiceChannel> channels = new ArrayList<>(); for (Server server : getServers()) { channels.addAll(server.getVoiceChannels()); }//w ww. j a v a 2s.co m return Collections.unmodifiableCollection(channels); }
From source file:delfos.rs.contentbased.vsm.booleanvsm.BooleanFeaturesTransformation.java
@Override public Iterator<FeatureValue> iterator() { Collection<FeatureValue> list = new ArrayList<>(); for (Feature feature : featureValuesIndexes.keySet()) { for (Object value : featureValuesIndexes.get(feature).keySet()) { list.add(new FeatureValue(feature, value)); }//from w w w . java2 s. c o m } list = Collections.unmodifiableCollection(list); return list.iterator(); }
From source file:org.alfresco.opencmis.dictionary.CMISDictionaryRegistryImpl.java
@Override public Collection<AbstractTypeDefinitionWrapper> getAssocDefs(boolean includeParent) { Collection<AbstractTypeDefinitionWrapper> ret = new LinkedList<>(); ret.addAll(getAssocDefsImpl());//from ww w .ja va 2 s . co m if (includeParent && getParent() != null) { ret.addAll(getParent().getAssocDefs()); } return Collections.unmodifiableCollection(ret); }
From source file:net.ontopia.topicmaps.impl.basic.index.ClassInstanceIndex.java
@Override public Collection<TopicIF> getAssociationRoleTypes() { // Create new collection Collection<TopicIF> result = new ArrayList<TopicIF>(roles.keySet()); result.remove(null);//from w w w .j av a 2 s . c o m return Collections.unmodifiableCollection(result); }
From source file:com.att.research.xacml.admin.model.GitRepositoryContainer.java
@Override public Collection<File> getChildren(Object itemId) { if (!(itemId instanceof File)) { return Collections.unmodifiableCollection(new LinkedList<File>()); }/*from w w w . ja v a 2s . c o m*/ File[] f; if (filter != null) { f = ((File) itemId).listFiles(filter); } else { f = ((File) itemId).listFiles(); } if (f == null) { return Collections.unmodifiableCollection(new LinkedList<File>()); } final List<File> l = Arrays.asList(f); Collections.sort(l); return Collections.unmodifiableCollection(l); }
From source file:com.datatorrent.stram.client.AppPackage.java
public Collection<String> getConfigs() { return Collections.unmodifiableCollection(configs); }
From source file:de.ailis.threedee.assets.Assets.java
/** * Returns all loaded textures.//from w w w.jav a 2 s. c o m * * @return The loaded textures. Never null. May be empty. */ public Collection<Mesh> getMeshes() { return Collections.unmodifiableCollection(this.meshes.values()); }
From source file:it.unibo.alchemist.model.implementations.environments.AbstractEnvironment.java
@Override public Iterator<Node<T>> iterator() { return Collections.unmodifiableCollection(nodes.valueCollection()).iterator(); }
From source file:com.enonic.cms.core.structure.menuitem.MenuItemEntity.java
/** * @return the children of this menu item in correct order. *//*from w w w. j av a 2s. com*/ public Collection<MenuItemEntity> getChildren() { return Collections.unmodifiableCollection(childrenMapByName.values()); }
From source file:com.google.gwt.dev.resource.impl.PathPrefixSet.java
public Collection<PathPrefix> values() { return Collections.unmodifiableCollection(prefixes); }