List of usage examples for java.util Collections unmodifiableSet
public static <T> Set<T> unmodifiableSet(Set<? extends T> s)
From source file:com.espertech.esper.core.service.StatementVariableRefImpl.java
public Set<String> getStatementNamesForVar(String variableName) { mapLock.acquireReadLock();//from w w w . j a v a 2s . co m try { Set<String> variables = variableToStmt.get(variableName); if (variables == null) { return Collections.EMPTY_SET; } return Collections.unmodifiableSet(variables); } finally { mapLock.releaseReadLock(); } }
From source file:net.sourceforge.fenixedu.domain.accounting.PaymentPlan.java
@Override public Set<Installment> getInstallmentsSet() { return Collections.unmodifiableSet(super.getInstallmentsSet()); }
From source file:org.web4thejob.web.panel.DefaultPlaceholderPanel.java
@Override public Set<CommandEnum> getSupportedCommands() { Set<CommandEnum> supported = new HashSet<CommandEnum>(super.getSupportedCommands()); supported.add(CommandEnum.DESIGN_PANEL); return Collections.unmodifiableSet(supported); }
From source file:com.ning.maven.plugins.duplicatefinder.ClasspathDescriptor.java
public Set getResources() { return Collections.unmodifiableSet(resourcesWithElements.keySet()); }
From source file:org.web4thejob.web.panel.DefaultRenderSchemePanel.java
@Override public Set<CommandEnum> getSupportedCommands() { Set<CommandEnum> supported = new HashSet<CommandEnum>(super.getSupportedCommands()); supported.add(CommandEnum.RENDER_SCHEME_LOOKUP); supported.add(CommandEnum.CLEAR);// w w w. ja v a 2s. c o m supported.add(CommandEnum.REMOVE); supported.add(CommandEnum.EDIT); supported.add(CommandEnum.MOVE_UP); supported.add(CommandEnum.MOVE_DOWN); return Collections.unmodifiableSet(supported); }
From source file:dstrelec.nats.config.NatsListenerEndpointRegistry.java
/** * Return the ids of the managed {@link NatsListenerContainer} instance(s). * @return the ids./* w w w . j a v a2 s . c o m*/ * @see #getListenerContainer(String) */ public Set<String> getListenerContainerIds() { return Collections.unmodifiableSet(this.listenerContainers.keySet()); }
From source file:fm.last.moji.tracker.pool.MultiHostTrackerPool.java
@Override public Set<InetSocketAddress> getAddresses() { Set<InetSocketAddress> addresses = new HashSet<InetSocketAddress>(); for (ManagedTrackerHost host : managedHosts) { addresses.add(host.getAddress()); }/*from w w w .jav a 2 s .c om*/ return Collections.unmodifiableSet(new HashSet<InetSocketAddress>(addresses)); }
From source file:com.qwazr.server.GenericServer.java
GenericServer(final GenericServerBuilder builder) throws IOException { this.configuration = builder.configuration; this.executorService = builder.executorService == null ? Executors.newCachedThreadPool() : builder.executorService;/*w ww . j a v a 2 s . com*/ this.servletContainer = Servlets.newContainer(); this.webAppContext = builder.webAppContext; this.webServiceContext = builder.webServiceContext; this.webAppEndPoints = webAppContext == null ? null : Collections.unmodifiableSet(webAppContext.endPoints); this.webServiceEndPoints = webServiceContext == null ? null : Collections.unmodifiableSet(webServiceContext.endPoints); builder.contextAttribute(this); this.contextAttributes = new LinkedHashMap<>(builder.contextAttributes); this.undertows = new ArrayList<>(); this.deploymentManagers = new ArrayList<>(); this.identityManagerProvider = builder.identityManagerProvider; this.hostnamePrincipalResolver = builder.hostnamePrincipalResolver; this.webAppAccessLogger = builder.webAppAccessLogger; this.webServiceAccessLogger = builder.webServiceAccessLogger; this.udpServer = buildUdpServer(builder, configuration); this.startedListeners = CollectionsUtils.copyIfNotEmpty(builder.startedListeners, ArrayList::new); this.shutdownListeners = CollectionsUtils.copyIfNotEmpty(builder.shutdownListeners, ArrayList::new); this.connectorsStatistics = new ArrayList<>(); this.registeredObjectNames = new LinkedHashSet<>(); }
From source file:com.thinkbiganalytics.nifi.v2.ingest.StripHeader.java
@Override protected void init(final ProcessorInitializationContext context) { super.init(context); final List<PropertyDescriptor> properties = new ArrayList<>(); properties.add(ENABLED);// ww w .j a va2s . co m properties.add(HEADER_LINE_COUNT); this.properties = Collections.unmodifiableList(properties); final Set<Relationship> relationships = new HashSet<>(); relationships.add(REL_ORIGINAL); relationships.add(REL_CONTENT); relationships.add(REL_HEADER); relationships.add(REL_FAILURE); this.relationships = Collections.unmodifiableSet(relationships); }
From source file:com.jeremydyer.nifi.processors.google.GoogleSpeechProcessor.java
@Override protected void init(final ProcessorInitializationContext context) { final List<PropertyDescriptor> descriptors = new ArrayList<PropertyDescriptor>(); descriptors.add(MY_PROPERTY);//from www . j a v a 2 s .co m this.descriptors = Collections.unmodifiableList(descriptors); final Set<Relationship> relationships = new HashSet<Relationship>(); relationships.add(REL_SUCCESS); this.relationships = Collections.unmodifiableSet(relationships); }