Example usage for java.util Collections unmodifiableSet

List of usage examples for java.util Collections unmodifiableSet

Introduction

In this page you can find the example usage for java.util Collections unmodifiableSet.

Prototype

public static <T> Set<T> unmodifiableSet(Set<? extends T> s) 

Source Link

Document

Returns an unmodifiable view of the specified set.

Usage

From source file:com.handu.open.dubbo.monitor.RegistryContainer.java

public Set<String> getServices() {
    return Collections.unmodifiableSet(services);
}

From source file:hr.fer.zemris.vhdllab.service.hierarchy.HierarchyNode.java

public Set<File> getDependencies() {
    return Collections.unmodifiableSet(dependencies);
}

From source file:com.zimbra.cs.mailclient.smtp.SmtpConnection.java

public Set<String> getValidRecipients() {
    return Collections.unmodifiableSet(validRecipients);
}

From source file:com.puppycrawl.tools.checkstyle.api.AbstractCheck.java

/**
 * Returns the tokens registered for the check.
 * @return the set of token names// w  w w. j  a v  a 2  s  .co m
 */
public final Set<String> getTokenNames() {
    return Collections.unmodifiableSet(tokens);
}

From source file:com.espertech.esper.core.StatementEventTypeRefImpl.java

public Set<String> getTypesForStatementName(String statementName) {
    mapLock.acquireReadLock();/*from  ww w.  j  a  va2 s .  c  o  m*/
    try {
        Set<String> types = stmtToType.get(statementName);
        if (types == null) {
            return Collections.EMPTY_SET;
        }
        return Collections.unmodifiableSet(types);
    } finally {
        mapLock.releaseReadLock();
    }
}

From source file:com.ellin.gf8.demo.model.Customer.java

/**
 * Return the {@link com.ellin.gf8.demo.model.Customer}'s addresses.
 *
 * @return/* w w  w.  jav  a2 s .c  o  m*/
 */
public Set<Address> getAddresses() {
    return Collections.unmodifiableSet(addresses);
}

From source file:org.keycloak.authz.server.admin.resource.representation.ResourceRepresentation.java

public Set<ScopeRepresentation> getScopes() {
    if (this.scopes == null) {
        return Collections.emptySet();
    }//from w  w w  .j  a  v a2 s. c o m

    return Collections.unmodifiableSet(this.scopes);
}

From source file:com.quartercode.classmod.extra.def.AbstractFunction.java

@Override
public Set<FunctionExecutorContext<R>> getExecutors() {

    return Collections.unmodifiableSet(new HashSet<FunctionExecutorContext<R>>(this.executors));
}

From source file:com.sysunite.weaver.nifi.FilterXMLNodes.java

@Override
protected void init(final ProcessorInitializationContext context) {
    final List<PropertyDescriptor> descriptors = new ArrayList<PropertyDescriptor>();
    descriptors.add(PROP_PREGMATCH);/*from   w w  w.j a  v a2  s .  c  o m*/
    descriptors.add(PROP_NODE);
    descriptors.add(PROP_NODE_ATTRIBUTE);
    this.descriptors = Collections.unmodifiableList(descriptors);

    final Set<Relationship> relationships = new HashSet<Relationship>();
    relationships.add(MY_RELATIONSHIP);
    this.relationships = Collections.unmodifiableSet(relationships);
}

From source file:de.flashpixx.rrd_antlr4.generator.IBaseGenerator.java

@Override
public final IGenerator generate(final File p_grammar) {
    final File l_outputdirectory = this.processoutputdirectory(p_grammar);
    try {//ww  w .j  a v a  2  s .  co m
        return this.processmessages(p_grammar, l_outputdirectory, ENGINE.generate(m_baseoutput,
                l_outputdirectory, p_grammar, m_docuclean, m_imports, m_templates));
    } catch (final IOException l_exception) {
        return this.processmessages(p_grammar, l_outputdirectory,
                Collections.unmodifiableSet(Stream.of(l_exception.getMessage()).collect(Collectors.toSet())));
    }

}