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.hortonworks.processors.network.GetTcpDumpAttributes.java

@Override
protected void init(final ProcessorInitializationContext context) {
    final List<PropertyDescriptor> descriptors = new ArrayList<PropertyDescriptor>();
    descriptors.add(MY_PROPERTY);/*from w w w . java2s. c  o  m*/
    this.descriptors = Collections.unmodifiableList(descriptors);

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

From source file:org.red5.cache.impl.CacheImpl.java

/** {@inheritDoc} */
public Iterator<String> getObjectNames() {
    return Collections.unmodifiableSet(CACHE.keySet()).iterator();
}

From source file:org.n52.iceland.binding.BindingRepository.java

@Override
public Set<BindingKey> getKeys() {
    return Collections.unmodifiableSet(this.bindings.keySet());
}

From source file:com.opengamma.engine.function.blacklist.FunctionBlacklistRule.java

public void setOutputs(final Collection<ValueSpecification> outputs) {
    if (outputs != null) {
        _outputs = Collections.unmodifiableSet(new HashSet<ValueSpecification>(outputs));
    } else {/*from   www.  j a va  2 s .  c  o  m*/
        _outputs = null;
    }
}

From source file:hr.fer.spocc.grammar.Grammar.java

public Set<ProductionRule<T>> getProductionRules() {
    return Collections.unmodifiableSet(productionRules);
}

From source file:com.bstek.dorado.view.PrivateDataTypeManager.java

@Override
public Set<String> getDataTypeNames() {
    Set<String> names = new HashSet<String>();
    if (parent != null) {
        names.addAll(parent.getDataTypeNames());
    }//from   w  w  w .j  a  v a 2 s .  c o  m
    names.addAll(getPrivateDataTypeNames());
    return Collections.unmodifiableSet(names);
}

From source file:com.acme.jpa.Game.java

public Set<Platform> getSupportedPlatforms() {
    return Collections.unmodifiableSet(supportedPlatforms);
}

From source file:de.kaiserpfalzEdv.office.core.security.OfficeLoginTicket.java

public Set<String> getRoles() {
    return Collections.unmodifiableSet(roles);
}

From source file:de.kaiserpfalzEdv.office.contacts.contact.ContactDO.java

@Override
public Set<ContactDO> getSubContacts() {
    return Collections.unmodifiableSet(contacts);
}

From source file:io.netlibs.bgp.config.nodes.impl.CapabilitiesImpl.java

@Override
public Set<Capability> getOptionalCapabilities() {
    return Collections.unmodifiableSet(this.optionalCapabilities);
}