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:com.teotigraphix.caustk.sound.SoundSource.java

@Override
public Collection<Tone> getTones() {
    return Collections.unmodifiableCollection(getModel().getTones().values());
}

From source file:edu.uci.ics.jung.graph.DirectedSparseGraph.java

public Collection<E> getOutEdges(V vertex) {
    if (!containsVertex(vertex))
        return null;
    return Collections.unmodifiableCollection(getOutgoing_internal(vertex));
}

From source file:lt.emasina.resthub.server.factory.MetadataFactory.java

@Override
public Collection<ServerTable> getTables() {
    return Collections.unmodifiableCollection(tables.whitelist.values());
}

From source file:ch.rasc.wampspring.demo.various.snake.SnakeService.java

private Collection<Snake> getSnakes() {
    return Collections.unmodifiableCollection(this.snakes.values());
}

From source file:com.shenit.commons.utils.CollectionUtils.java

/**
 * Safe get method to prevent index out of bounds
 * @param vals/* w  ww. j  a v a 2 s  . c o m*/
 * @param idx
 * @return
 */
public static <T> T get(Collection<T> vals, int idx) {
    if (ValidationUtils.isEmpty(vals) || Math.abs(idx) >= vals.size())
        return null;
    if (idx < 0)
        idx += vals.size();
    List<T> list = new ArrayList<>(Collections.unmodifiableCollection(vals));
    return list.get(idx);
}

From source file:com.sonatype.nexus.perftest.PerformanceTest.java

public Collection<ClientSwarm> getSwarms() {
    return Collections.unmodifiableCollection(new ArrayList<>(swarms));
}

From source file:com.ponysdk.ui.server.basic.PDatePicker.java

public Collection<PShowRangeHandler<Date>> getShowRangeHandlers() {
    return Collections.unmodifiableCollection(showRangeHandlers);
}

From source file:com.ponysdk.ui.server.basic.PRichTextArea.java

@Override
public Collection<PValueChangeHandler<String>> getValueChangeHandlers() {
    return Collections.unmodifiableCollection(handlers);
}

From source file:com.haulmont.cuba.desktop.gui.components.DesktopAbstractField.java

@Override
public Collection<Validator> getValidators() {
    return Collections.unmodifiableCollection(validators);
}

From source file:com.github.mrstampy.gameboot.usersession.ActiveSessions.java

/**
 * Gets the session ids./*from   w w  w. ja v a 2s  .co m*/
 *
 * @return the session ids
 */
public Collection<Long> getSessionIds() {
    return Collections.unmodifiableCollection(sessions.values());
}