Example usage for java.util Collections unmodifiableCollection

List of usage examples for java.util Collections unmodifiableCollection

Introduction

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

Prototype

public static <T> Collection<T> unmodifiableCollection(Collection<? extends T> c) 

Source Link

Document

Returns an unmodifiable view of the specified collection.

Usage

From source file:io.spring.initializr.metadata.DependenciesCapability.java

/**
 * Return all dependencies as a flat collection
 *//*from  w  ww .  j a  v  a2  s.co m*/
public Collection<Dependency> getAll() {
    return Collections.unmodifiableCollection(indexedDependencies.values());
}

From source file:io.gravitee.repository.redis.management.internal.impl.ApplicationRedisRepositoryImpl.java

@Override
public Set<RedisApplication> find(List<String> applicationIds) {
    return redisTemplate.opsForHash().multiGet(REDIS_KEY, Collections.unmodifiableCollection(applicationIds))
            .stream().map(o -> this.convert(o, RedisApplication.class)).collect(Collectors.toSet());
}

From source file:ar.com.zauber.commons.moderation.model.EnumModerationState.java

/** @see ModerationState#getValidDestinations() */
public Collection<ModerationState> getValidDestinations() {
    return Collections.unmodifiableCollection(validDestinations);
}

From source file:com.frank.search.solr.core.query.ParameterHolder.java

/**
 * @return unmodifiable collection of all parameters present
 *///from w  w w.  ja v  a 2  s .  c o  m
public Collection<T> getParameters() {
    return Collections.unmodifiableCollection(this.parameters.values());
}

From source file:com.openshift.internal.restclient.model.List.java

@Override
public Collection<IResource> getItems() {
    if (items == null) {
        String key = getNode().has(OBJECTS) ? OBJECTS : "items";
        Collection<ModelNode> nodes = get(key).asList();
        items = new ArrayList<>(nodes.size());
        IResourceFactory factory = getClient().getResourceFactory();
        if (factory != null) {
            for (ModelNode node : nodes) {
                if (kind != null && !node.get(KIND).isDefined()) {
                    set(node, KIND, kind);
                }/*w  w  w.ja va  2s  .co  m*/
                IResource resource = factory.create(node.toJSONString(true));
                items.add(resource);
            }
        }
    }
    return Collections.unmodifiableCollection(items);
}

From source file:nl.spellenclubeindhoven.dominionshuffle.data.Data.java

public Data(Collection<Card> cards, Collection<Group> groups, Collection<Card> nonKingdomCards) {
    this.cards = Collections.unmodifiableCollection(cards);
    this.groups = Collections.unmodifiableCollection(groups);
    this.nonKingdomCards = Collections.unmodifiableCollection(nonKingdomCards);
    initializeMappings();/*from  w  w  w .j av  a 2s.com*/
}

From source file:com.frank.search.solr.core.query.result.SimpleFieldStatsResult.java

@Override
public Collection<Object> getDistinctValues() {
    return Collections.unmodifiableCollection(this.distinctValues);
}

From source file:nl.salp.warcraft4j.casc.cdn.Index.java

public Collection<IndexEntry> getEntries() {
    return Collections.unmodifiableCollection(entries.values());
}

From source file:com.autentia.poda.FileMetadata.java

public Collection<FileMetadata> references() {
    return Collections.unmodifiableCollection(references);
}

From source file:com.edmunds.etm.rules.impl.UrlTokenDictionary.java

/**
 * Returns a collection of all UrlToken objects from the dictionary.
 *
 * @return collection of UrlToken objects
 *///from   w  w w .  j  av a  2 s  .  com
public Collection<UrlToken> getAll() {
    return Collections.unmodifiableCollection(tokenDefinitions.values());
}