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:gaffer.user.User.java

public Set<String> getOpAuths() {
    return Collections.unmodifiableSet(opAuths);
}

From source file:com.opengamma.financial.currency.AbstractCurrencyMatrix.java

@Override
public Set<Currency> getTargetCurrencies() {
    return Collections.unmodifiableSet(_targets.keySet());
}

From source file:com.arpnetworking.clusteraggregator.models.ShardAllocation.java

@JsonSerialize(using = CountingSetSerializer.class)
public Set<String> getIncomingShards() {
    return Collections.unmodifiableSet(_incomingShards);
}

From source file:descriptordump.dumpexecutor.AbstractExecutor.java

public final Set<Descriptor> getUnmodifiableDest() {
    return Collections.unmodifiableSet(dest);
}

From source file:com.graphaware.importer.data.location.SimpleDataLocator.java

/**
 * {@inheritDoc}
 */
@Override
public final Set<Data> allData() {
    return Collections.unmodifiableSet(locations.keySet());
}

From source file:fr.mby.portal.coreimpl.acl.BasicRoleFactory.java

@Override
public IRole initializeRole(final String name, final Set<IPermission> permissions, final Set<IRole> subRoles) {
    Assert.hasText(name, "No name provided !");

    final BasicRole newRole = new BasicRole(name);

    if (permissions != null) {
        newRole.setPermissions(Collections.unmodifiableSet(permissions));
    } else {//from ww  w  .java  2  s  . c  o m
        newRole.setPermissions(Collections.<IPermission>emptySet());
    }

    if (subRoles != null) {
        newRole.setSubRoles(Collections.unmodifiableSet(subRoles));
    } else {
        newRole.setSubRoles(Collections.<IRole>emptySet());
    }

    this.rolesCache.put(name, newRole);

    return newRole;
}

From source file:com.opengamma.bbg.ReferenceDataResult.java

/**
 * Gets the set of securities stored in this result.
 * /* ww  w  .  j  a va 2 s.c  om*/
 * @return the set of security keys, not null
 */
public Set<String> getSecurities() {
    return Collections.unmodifiableSet(_resultsBySecurity.keySet());
}

From source file:io.netlibs.bgp.rib.TopologicalTreeSortingKey.java

public TopologicalTreeSortingKey(AddressFamily afi, SubsequentAddressFamily safi,
        Collection<PathAttribute> attributes) {
    this.addressFamilyKey = new AddressFamilyKey(afi, safi);
    if (attributes != null)
        pathAttributes.addAll(attributes);

    pathAttributes = Collections.unmodifiableSet(pathAttributes);
}

From source file:br.ufal.cideei.soot.instrument.bitrep.SetBitConfigRep.java

public SetBitConfigRep(Collection<IConfigRep> configs, BidiMap atoms, int highestId) {
    this.atoms = (UnmodifiableBidiMap) UnmodifiableBidiMap.decorate(atoms);
    this.configs = Collections.unmodifiableSet(new HashSet<IConfigRep>(configs));
    this.highestId = highestId;
}

From source file:ru.efo.security.ADUserDetails.java

public ADUserDetails(String username, String password, String displayName, String email, String phone,
        boolean blocked, final Set<String> groups, final Set<String> roles) {
    this.username = username;
    this.password = password;
    this.displayName = displayName;
    this.email = email;
    this.phone = phone;
    this.blocked = blocked;
    this.groups = Collections.unmodifiableSet(groups);
    this.roles = Collections.unmodifiableSet(roles);
}