List of usage examples for java.util Collections unmodifiableCollection
public static <T> Collection<T> unmodifiableCollection(Collection<? extends T> c)
From source file:edu.uci.ics.jung.graph.DirectedOrderedSparseMultigraph.java
@Override public Collection<V> getPredecessors(V vertex) { if (!containsVertex(vertex)) return null; Set<V> preds = new LinkedHashSet<V>(); for (E edge : getIncoming_internal(vertex)) preds.add(this.getSource(edge)); return Collections.unmodifiableCollection(preds); }
From source file:eu.matejkormuth.pexel.commons.MultiValueMap.java
public Collection<V> getAll(final K key) { return Collections.unmodifiableCollection(this.internalMap.get(key)); }
From source file:me.st28.flexseries.flexchat.api.channel.ChannelInstance.java
public Collection<Chatter> getChatters() { return Collections.unmodifiableCollection(chatters); }
From source file:com.autentia.showcase.contacts.AddressBook.java
public Collection<Contact> filterContactsBy(String name) { final Collection<Contact> contactsWithName = new ArrayList<Contact>(); for (Contact contact : contacts.values()) { if (contact.getName().contains(name)) { contactsWithName.add(contact); }/*from w w w .j a v a 2s. c om*/ } return Collections.unmodifiableCollection(contactsWithName); }
From source file:com.autentia.poda.FileMetadata.java
public Collection<FileMetadata> referencedBy() { return Collections.unmodifiableCollection(referencedBy); }
From source file:com.google.code.guice.repository.spi.DefaultRepositoryBinder.java
@Override public Collection<RepositoryBinding> getBindings() { return Collections.unmodifiableCollection(bindings); }
From source file:com.google.code.guice.repository.configuration.RepositoriesGroup.java
public Collection<String> getRepositoriesPackages() { return Collections.unmodifiableCollection(repositoriesPackages); }
From source file:org.shredzone.cilla.service.security.CillaUserDetails.java
/** * Instantiates a new {@link CillaUserDetails} for the given {@link User}. * * @param user//from ww w .j a v a2 s . c o m * the {@link User} */ public CillaUserDetails(User user) { userId = user.getId(); login = user.getLogin(); name = user.getName(); encryptedPassword = user.getPassword(); locale = user.getLanguage().getLocale(); timeZone = user.getTimeZone(); role = user.getRole().getName(); rights = Collections.unmodifiableCollection(user.getRole().getAuthorities().stream().map(Authority::getName) .map(it -> "ROLE_" + it).map(SimpleGrantedAuthority::new).collect(Collectors.toList())); }
From source file:org.shredzone.commons.view.manager.ViewManager.java
/** * Returns a collection of all defined {@link ViewPattern}. * * @return Collection of matching {@link ViewPattern} *///from w ww . ja va2s . c o m public Collection<ViewPattern> getViewPatterns() { return Collections.unmodifiableCollection(patternOrder); }
From source file:com.opengamma.master.historicaltimeseries.impl.HistoricalTimeSeriesRating.java
/** * Gets the rules field./* w w w .j a v a 2 s. co m*/ * * @return the rules, not null */ public Collection<HistoricalTimeSeriesRatingRule> getRules() { return Collections.unmodifiableCollection(_rules); }