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:de.knowwe.baseline.Baseline.java

public Collection<String> getArticles() {
    return Collections.unmodifiableCollection(articles.keySet());
}

From source file:com.kspichale.assert_playground.model.Car.java

public Collection<Extra> getExtras() {
    return Collections.unmodifiableCollection(extras);
}

From source file:com.haulmont.cuba.core.sys.javacl.compiler.ClassLoaderImpl.java

Collection<String> classNames() {
    return Collections.unmodifiableCollection(classes.keySet());
}

From source file:net.ontopia.topicmaps.impl.basic.index.IdentifierIndex.java

@Override
public Collection<LocatorIF> getSubjectIdentifiers() {
    return Collections.unmodifiableCollection(sicache.getSubjectIdentifiers());
}

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

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

From source file:io.github.minime89.passbeam.keyboard.Keysyms.java

private Keysyms(@ElementList(name = "keysyms", inline = true, required = true) Collection<Keysym> keysyms) {
    this.keysyms = Collections.unmodifiableCollection(keysyms);
}

From source file:com.netflix.simianarmy.conformity.AutoScalingGroup.java

/**
 * * Gets the instances of the auto scaling group.
 * @return/*w w  w .  j  a  v  a 2 s . co  m*/
 *    the instances of the auto scaling group
 */
public Collection<String> getInstances() {
    return Collections.unmodifiableCollection(instances);
}

From source file:hsyndicate.utils.IPUtils.java

public static Collection<String> getHostAddress() {
    if (!cachedHostAddr.isEmpty()) {
        return Collections.unmodifiableCollection(cachedHostAddr);
    } else {/*from w ww. j a va  2 s  . c om*/
        try {
            Enumeration e = NetworkInterface.getNetworkInterfaces();
            while (e.hasMoreElements()) {
                NetworkInterface n = (NetworkInterface) e.nextElement();
                Enumeration ee = n.getInetAddresses();
                while (ee.hasMoreElements()) {
                    InetAddress i = (InetAddress) ee.nextElement();

                    String hostAddress = i.getHostAddress();
                    if (isProperHostAddress(hostAddress)) {
                        if (!cachedHostAddr.contains(hostAddress)) {
                            cachedHostAddr.add(hostAddress);
                        }
                    }

                    String hostName = i.getHostName();
                    if (isProperHostAddress(hostName)) {
                        if (!cachedHostAddr.contains(hostName)) {
                            cachedHostAddr.add(hostName);
                        }
                    }

                    String canonicalHostName = i.getCanonicalHostName();
                    if (isProperHostAddress(canonicalHostName)) {
                        if (!cachedHostAddr.contains(canonicalHostName)) {
                            cachedHostAddr.add(canonicalHostName);
                        }
                    }
                }
            }
        } catch (SocketException ex) {
            LOG.error("Exception occurred while scanning local interfaces", ex);
        }

        return Collections.unmodifiableCollection(cachedHostAddr);
    }
}

From source file:com.mpush.zk.cache.ZKServerNodeCache.java

@Override
public Collection<ZKServerNode> values() {
    return Collections.unmodifiableCollection(cache.values());
}

From source file:io.github.minime89.passbeam.keyboard.Scancodes.java

private Scancodes(
        @ElementList(name = "scancodes", inline = true, required = true) Collection<Scancode> scancodes) {
    this.scancodes = Collections.unmodifiableCollection(scancodes);
}