List of usage examples for java.util Collections unmodifiableCollection
public static <T> Collection<T> unmodifiableCollection(Collection<? extends T> c)
From source file:org.openeos.services.security.internal.ClientGrantedAuthorityProvider.java
@Override public Collection<? extends GrantedAuthority> getAuthorities(User user) { if (user.getClient() == null) { return null; } else {/*from w w w . ja v a 2s .co m*/ return Collections.unmodifiableCollection( Arrays.asList(new ObjectGrantedAuthority(Client.class, user.getClient().getId()))); } }
From source file:cn.edu.zjnu.acm.judge.config.LocaleFactory.java
public Collection<String> getAllLanguages() { return Collections.unmodifiableCollection(allLanguages); }
From source file:io.github.minime89.passbeam.keyboard.Layouts.java
private Layouts(Collection<Layout> layouts) { this.layouts = Collections.unmodifiableCollection(layouts); }
From source file:com.opengamma.language.livedata.LiveDataProviderBean.java
public Collection<PublishedLiveData> getLiveData() { return Collections.unmodifiableCollection(getLiveDataInternal()); }
From source file:com.opengamma.language.procedure.ProcedureProviderBean.java
public Collection<PublishedProcedure> getProcedures() { return Collections.unmodifiableCollection(getProceduresInternal()); }
From source file:cloudfoundry.norouter.f5.client.SubCollection.java
public SubCollection(@JsonProperty("link") URI link, @JsonProperty("items") Collection<T> items) { this.link = link; if (items == null) { this.items = Optional.empty(); } else {//from w ww . j a v a2 s. c om items = Collections.unmodifiableCollection(new ArrayList<>(items)); this.items = Optional.of(items); } }
From source file:net.ontopia.topicmaps.impl.basic.index.IdentifierIndex.java
@Override public Collection<LocatorIF> getItemIdentifiers() { return Collections.unmodifiableCollection(sicache.getItemIdentifiers()); }
From source file:fuzzy.util.CrispFuzzyProduct.java
/** * Constructor with arguments./*ww w. j a v a 2 s . c om*/ * * @param col a collection * @param mf membership function */ public CrispFuzzyProduct(Collection<T> col, MembershipFunction<T> mf) { this.collection = Collections.unmodifiableCollection(col); this.mf = mf; }
From source file:com.xively.client.model.Permission.java
@JsonCreator public Permission(@JsonProperty("source_ip") String sourceIp, @JsonProperty("access_methods") Collection<AccessMethod> accessMethods, @JsonProperty("resources") Collection<Resource> resources) { this.sourceIp = sourceIp; this.accessMethods = accessMethods == null ? null : Collections.unmodifiableCollection(accessMethods); this.resources = resources == null ? null : Collections.unmodifiableCollection(resources); }
From source file:com.github.robozonky.app.events.SessionEvents.java
static Collection<SessionEvents> all() { // defensive copy return Collections.unmodifiableCollection(new ArrayList<>(BY_TENANT.values())); }