List of usage examples for java.util Collections unmodifiableSet
public static <T> Set<T> unmodifiableSet(Set<? extends T> s)
From source file:com.doxologic.nifi.processors.Repeater.java
@Override protected void init(final ProcessorInitializationContext context) { final List<PropertyDescriptor> descriptors = new ArrayList<PropertyDescriptor>(); descriptors.add(REPEAT_COUNT);//from ww w . j a v a2 s . c om descriptors.add(PENALIZE_PASSES); this.descriptors = Collections.unmodifiableList(descriptors); final Set<Relationship> relationships = new HashSet<Relationship>(); relationships.add(REPEAT); relationships.add(NO_REPEAT); this.relationships = Collections.unmodifiableSet(relationships); }
From source file:edu.cornell.mannlib.vitro.webapp.auth.policy.bean.PropertyRestrictionBeanImpl.java
public PropertyRestrictionBeanImpl(Collection<String> prohibitedNamespaces, Collection<String> permittedExceptions, ContextModelAccess models) { Objects.requireNonNull(prohibitedNamespaces, "prohibitedNamespaces may not be null."); this.prohibitedNamespaces = Collections.unmodifiableSet(new TreeSet<>(prohibitedNamespaces)); Objects.requireNonNull(permittedExceptions, "permittedExceptions may not be null."); this.permittedExceptions = Collections.unmodifiableSet(new TreeSet<>(permittedExceptions)); Objects.requireNonNull(models, "models may not be null."); populateThresholdMap(models.getWebappDaoFactory()); }
From source file:org.apache.nifi.processors.example.utils.RenameJSONFields.java
@Override protected void init(final ProcessorInitializationContext context) { final List<PropertyDescriptor> descriptors = new ArrayList<>(); descriptors.add(FIELD_MAPPINGS);//from w w w . j a v a 2 s. c o m descriptors.add(EXCLUDE_FIELDS); this.descriptors = Collections.unmodifiableList(descriptors); final Set<Relationship> relationships = new HashSet<>(); relationships.add(REL_SUCCESS); relationships.add(REL_FAILURE); this.relationships = Collections.unmodifiableSet(relationships); }
From source file:com.jeremydyer.processors.salesforce.GenerateSOQL.java
@Override protected void init(final ProcessorInitializationContext context) { final List<PropertyDescriptor> descriptors = new ArrayList<PropertyDescriptor>(); descriptors.add(SALESFORCE_SERVER_INSTANCE); descriptors.add(LAST_SYNC_TIME);/*from w w w .ja va 2 s .com*/ this.descriptors = Collections.unmodifiableList(descriptors); final Set<Relationship> relationships = new HashSet<Relationship>(); relationships.add(REL_SUCCESS); this.relationships = Collections.unmodifiableSet(relationships); }
From source file:channellistmaker.listmaker.EPGListMaker.java
/** * EPG XML????????//from w w w .j av a 2s . c o m * * @return ???????Document???????? */ public synchronized Set<Document> seek() { Set<Document> EPGs = Collections.synchronizedSet(new HashSet<Document>()); List<File> FL = this.seeker.seek(); for (File F : FL) { Document d = new XMLLoader(charset).Load(F); if (d != null) { LOG.info("EPG?????? EPG FILE = " + F.toString()); EPGs.add(d); } else { LOG.warn( "EPG?????????????? EPG FILE = " + F.toString()); } } return Collections.unmodifiableSet(EPGs); }
From source file:org.keycloak.authz.server.uma.representation.UmaResourceRepresentation.java
public Set<UmaScopeRepresentation> getScopes() { return Collections.unmodifiableSet(this.scopes); }
From source file:org.keycloak.authz.client.representation.ResourceRepresentation.java
public Set<ScopeRepresentation> getScopes() { return Collections.unmodifiableSet(this.scopes); }
From source file:org.web4thejob.web.panel.DefaultTabbedEntityViewPanel.java
@Override public Set<CommandEnum> getSupportedCommands() { Set<CommandEnum> supported = new HashSet<CommandEnum>(super.getSupportedCommands()); supported.add(CommandEnum.CONFIGURE_HEADERS); return Collections.unmodifiableSet(supported); }
From source file:de.kaiserpfalzEdv.office.core.security.impl.SecurityTicket.java
public Set<String> getRoles() { HashSet<String> result = new HashSet<>(); account.getRoles().forEach(t -> result.add(t.getDisplayNumber())); return Collections.unmodifiableSet(result); }
From source file:com.qcadoo.mes.basic.shift.WorkingHours.java
public Set<TimeRange> getTimeRanges() { return Collections.unmodifiableSet(hours); }