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:edu.uci.ics.jung.graph.SparseMultigraph.java

public Collection<E> getInEdges(V vertex) {
    if (!containsVertex(vertex))
        return null;
    return Collections.unmodifiableCollection(vertices.get(vertex).getFirst());
}

From source file:com.haulmont.cuba.gui.components.AbstractAction.java

@Override
public Collection<Component.ActionOwner> getOwners() {
    return Collections.unmodifiableCollection(owners);
}

From source file:com.yahoo.parsec.clients.ParsecAsyncHttpRequest.java

/**
 * Get cookies.
 *
 * @return Cookies
 */
public Collection<NewCookie> getCookies() {
    return Collections.unmodifiableCollection(cookies);
}

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

public Collection<Concept> getNarrowerConcepts() {
    return Collections.unmodifiableCollection(this.narrowerConcepts);
}

From source file:com.wms.studio.cache.lock.SyncLockMapCache.java

@Override
public Collection<V> values() {
    try {//  w  w w  .  jav a 2  s  . c  o  m
        HashMap<K, V> attributes = memcachedClient.get(name);
        if (attributes != null) {
            Collection<V> values = attributes.values();
            if (!CollectionUtils.isEmpty(values))
                return Collections.unmodifiableCollection(values);
        }
    } catch (Exception e) {
        log.fatal("?MemCache,.", e);
    }
    return Collections.emptySet();
}

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

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

From source file:edu.sabanciuniv.sentilab.sare.models.base.document.PersistentDocument.java

/**
 * Gets the derived documents of this document.
 * @return an {@link Iterable} of {@link PersistentDocument} objects that are the derived documents of this document.
 *//*www  .j a  v  a2 s.  c o m*/
public Iterable<PersistentDocument> getDerivedDocuments() {
    if (this.derivedDocuments == null) {
        this.derivedDocuments = Lists.newArrayList();
    }

    return Collections.unmodifiableCollection(this.derivedDocuments);
}

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

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

    Set<V> neighbors = new HashSet<V>();
    for (E edge : getIncident_internal(vertex)) {
        Pair<V> endpoints = this.getEndpoints(edge);
        V e_a = endpoints.getFirst();/*from  www.ja  va 2  s .com*/
        V e_b = endpoints.getSecond();
        if (vertex.equals(e_a))
            neighbors.add(e_b);
        else
            neighbors.add(e_a);
    }

    return Collections.unmodifiableCollection(neighbors);
}

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

@Log(level = LogLevel.INFO)
@AuditTrail/*  w w w  .j av  a2  s. c  o m*/
public Collection<org.openinfinity.sso.identityprovisioning.bpmn.Task> queryForUserTasks() {
    SecurityContext securityContext = SecurityContextHolder.getContext();
    Authentication authentication = securityContext.getAuthentication();
    IdentityService identityService = processEngine.getIdentityService();
    identityService.setAuthenticatedUserId(authentication.getName());
    TaskService taskService = processEngine.getTaskService();
    List<Task> tasks = taskService.createTaskQuery().taskCandidateUser(authentication.getName()).list();
    Collection<org.openinfinity.sso.identityprovisioning.bpmn.Task> simpleTasks = mapTasks(tasks);
    return Collections.unmodifiableCollection(simpleTasks);
}

From source file:de.ks.flatadocdb.index.GlobalIndex.java

public Collection<String> getAllIds() {
    return Collections.unmodifiableCollection(idToElement.keySet());
}