List of usage examples for java.util Collections unmodifiableSet
public static <T> Set<T> unmodifiableSet(Set<? extends T> s)
From source file:org.openwms.core.uaa.Role.java
/** * Return an unmodifiable Set of all {@link SecurityObject}s belonging to the Role. * * @return A Set of all {@link SecurityObject}s belonging to this Role *///from w ww.j a v a 2s. c o m public Set<SecurityObject> getGrants() { return Collections.unmodifiableSet(grants); }
From source file:com.thinkbiganalytics.nifi.v2.elasticsearch.MergeHiveTableMetadata.java
/** * default constructor constructs the relationship and property collections *//*from w ww . ja v a2 s. com*/ public MergeHiveTableMetadata() { final Set<Relationship> r = new HashSet<>(); r.add(REL_SUCCESS); r.add(REL_FAILURE); relationships = Collections.unmodifiableSet(r); final List<PropertyDescriptor> pds = new ArrayList<>(); pds.add(DATABASE_NAME); pds.add(DATABASE_OWNER); pds.add(TABLE_CREATE_TIME); pds.add(TABLE_NAME); pds.add(TABLE_TYPE); pds.add(COLUMN_NAME); pds.add(COLUMN_TYPE); pds.add(COLUMN_COMMENT); propDescriptors = Collections.unmodifiableList(pds); }
From source file:ddf.catalog.data.impl.MetacardTypeImpl.java
public Set<AttributeDescriptor> addAll(Set<AttributeDescriptor> descriptors) { if (CollectionUtils.isNotEmpty(descriptors)) { for (AttributeDescriptor descriptor : descriptors) { this.descriptors.put(descriptor.getName(), descriptor); }//from ww w .ja v a 2s . c o m } return Collections.unmodifiableSet(new HashSet<>(this.descriptors.values())); }
From source file:com.bennavetta.appsite.processing.ProcessingController.java
public Set<Processor> getProcessors() { return Collections.unmodifiableSet(processors); }
From source file:it.scoppelletti.programmerpower.security.User.java
/** * Imposta le autorità//from ww w . j a v a2 s.co m */ @PostLoad @PrePersist @PreUpdate @Transient private void setAuthorities() { Set<GrantedAuthority> roles = new HashSet<GrantedAuthority>(); for (String role : myRoles) { roles.add(new SimpleGrantedAuthority(role)); } myAuthorities = Collections.unmodifiableSet(roles); }
From source file:com.zotoh.maedr.cloud.CloudData.java
/** * @param region/*from ww w. jav a 2 s. co m*/ * @return * @throws JSONException */ public Set<String> listZones(String region) throws JSONException { JSONObject r = getRegions(), zs = r.optJSONObject(region); Set<String> rc = ST(); if (zs != null) { for (Iterator<?> it = zs.keys(); it.hasNext();) { rc.add(nsb(it.next())); } } return Collections.unmodifiableSet(rc); }
From source file:com.zc.study.fileinjection.springintegration.MessageHeaders.java
public Set<String> keySet() { return Collections.unmodifiableSet(this.headers.keySet()); }
From source file:com.bennavetta.appsite.processing.ProcessingController.java
public Set<OutputProcessor> getPostProcessors() { return Collections.unmodifiableSet(postProcessors); }
From source file:com.hmsinc.epicenter.classifier.util.ClassifierUtils.java
private static Set<String> makeStopSet(String... words) { final Set<String> stopSet = new HashSet<String>(); stopSet.addAll(Arrays.asList(words)); return Collections.unmodifiableSet(stopSet); }
From source file:com.discover.cls.processors.cls.GeoEnrichEnriched.java
@Override protected void init(final ProcessorInitializationContext context) { final Set<Relationship> rels = new HashSet<>(); rels.add(REL_FOUND);// www . ja va2s . c o m rels.add(REL_NOT_FOUND); this.relationships = Collections.unmodifiableSet(rels); final List<PropertyDescriptor> props = new ArrayList<>(); props.add(GEO_DATABASE_FILE); props.add(IP_ADDRESS_ATTRIBUTE); this.propertyDescriptors = Collections.unmodifiableList(props); }