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:cl.ucn.disc.zoome.zui.layout.OrderedSparseGraph.java

public Collection<V> getSuccessors(V vertex) {
    if (!containsVertex(vertex))
        return null;

    // consider directed outedges and undirected
    Collection<V> succs = new HashSet<V>(vertex_maps.get(vertex)[OUTGOING].keySet());
    succs.addAll(vertex_maps.get(vertex)[INCIDENT].keySet());
    return Collections.unmodifiableCollection(succs);
}

From source file:com.jakemadethis.graphite.graph.OrderedHypergraph.java

public Collection<H> findEdgeSet(V v1, V v2) {
    if (!containsVertex(v1) || !containsVertex(v2))
        return null;

    Collection<H> edges = new ArrayList<H>();
    for (H h : getIncidentEdges(v1)) {
        if (isIncident(v2, h))
            edges.add(h);//  www .ja va 2 s. c om
    }
    return Collections.unmodifiableCollection(edges);
}

From source file:com.edgenius.wiki.render.impl.RenderContextImpl.java

public void setRegions(List<Region> region) {
    this.regions = Collections.unmodifiableCollection(region);
}

From source file:fr.gouv.culture.thesaurus.service.rdf.Concept.java

public Collection<Concept> getRelatedConcepts() {
    return Collections.unmodifiableCollection(this.relatedConcepts);
}

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

public Collection<V> getPredecessors(V vertex) {
    if (!containsVertex(vertex))
        return null;

    Set<V> preds = new HashSet<V>();
    for (E edge : getIncoming_internal(vertex)) {
        if (getEdgeType(edge) == EdgeType.DIRECTED) {
            preds.add(this.getSource(edge));
        } else {/*from   w w w.j a  v  a2s  .c o  m*/
            preds.add(getOpposite(vertex, edge));
        }
    }
    return Collections.unmodifiableCollection(preds);
}

From source file:com.chiorichan.site.SiteManager.java

public Collection<Site> getSites() {
    return Collections.unmodifiableCollection(sites.values());
}

From source file:org.openinfinity.sso.identityprovisioning.bpmn.ProcessEngineBridgeImpl.java

@Log(level = LogLevel.INFO)
@AuditTrail//from  ww w  .ja  va  2 s. c  o m
public Collection<org.openinfinity.sso.identityprovisioning.bpmn.Task> queryForUserTasks(String username) {
    IdentityService identityService = processEngine.getIdentityService();
    identityService.setAuthenticatedUserId(username);
    TaskService taskService = processEngine.getTaskService();
    List<Task> tasks = taskService.createTaskQuery().taskCandidateUser(username).list();
    Collection<org.openinfinity.sso.identityprovisioning.bpmn.Task> simpleTasks = mapTasks(tasks);
    return Collections.unmodifiableCollection(simpleTasks);
}

From source file:cl.ucn.disc.zoome.zui.layout.OrderedSparseGraph.java

public Collection<E> getEdges(EdgeType edgeType) {
    if (edgeType == EdgeType.DIRECTED)
        return Collections.unmodifiableCollection(directed_edges.keySet());
    else if (edgeType == EdgeType.UNDIRECTED)
        return Collections.unmodifiableCollection(undirected_edges.keySet());
    else//from  ww  w . j  av a 2  s  .c  o m
        return null;
}

From source file:com.github.erchu.beancp.MapperBuilder.java

@Override
public boolean isMapAvailable(final Class sourceClass, final Class destinationClass) {
    notNull(sourceClass, "sourceClass");
    notNull(destinationClass, "destinationClass");

    return MapperExecutorSelector.isMapAvailable(this, sourceClass, destinationClass,
            Collections.unmodifiableCollection(_maps), Collections.unmodifiableCollection(_mapAnyConventions));
}

From source file:com.willwinder.universalgcodesender.utils.Settings.java

public Collection<String> getRecentFiles() {
    return Collections.unmodifiableCollection(fileHistory);
}