List of usage examples for java.util Collections unmodifiableCollection
public static <T> Collection<T> unmodifiableCollection(Collection<? extends T> c)
From source file:io.milton.http.annotated.AnnotationResourceFactory.java
public void setControllers(Collection<Object> controllers) { this.controllers = Collections.unmodifiableCollection(controllers); log.info("setControllers: " + controllers.size() + " parsing controllers..."); for (Object controller : controllers) { log.info("Parse controller: " + controller.getClass()); for (AnnotationHandler ah : mapOfAnnotationHandlers.values()) { log.info(" - controller: " + controller.getClass() + " handler: " + ah.getAnnoClass()); ah.parseController(controller); }//from www. jav a 2 s . c o m } log.info("Controller parsing complete. Listing found methods.."); for (AnnotationHandler ah : mapOfAnnotationHandlers.values()) { log.info("Annotation: " + ah.getAnnoClass()); List<ControllerMethod> list = ah.getControllerMethods(); if (list == null || list.isEmpty()) { log.info(" No methods found"); } else { for (ControllerMethod cm : ah.getControllerMethods()) { log.info(" method: " + cm.method); } } } }
From source file:com.net2plan.libraries.GraphTheoryMetrics.java
/** * Returns the set of nodes reachable from a given node. * * @param node Node/*from w w w . j a va 2 s. c o m*/ * @return Collection of reachable nodes */ public Collection<Node> getNeighbors(Node node) { return Collections.unmodifiableCollection(getGraph_JUNG().getSuccessors(node)); }
From source file:com.smartitengineering.cms.spi.impl.workspace.WorkspaceServiceImpl.java
@Override public Collection<RepresentationTemplate> getRepresentationsWithoutData(WorkspaceId id, ResourceSortCriteria criteria) { List<QueryParameter> params = new ArrayList<QueryParameter>(); final String info = WorkspaceObjectConverter.REP_INFO; params.add(QueryParameterFactory.getPropProjectionParam(info)); params.add(getIdParam(id));// w w w .ja v a 2 s. c o m final PersistentWorkspace single = commonReadDao.getSingle(params); List<? extends RepresentationTemplate> templates = new ArrayList( single == null ? Collections.<RepresentationTemplate>emptyList() : single.getRepresentationTemplates()); if (templates.isEmpty()) { return Collections.emptyList(); } final Comparator<ResourceTemplate> comp; if (ResourceSortCriteria.BY_DATE.equals(criteria)) { comp = TEMPLATE_DATE_COMPARATOR; } else { comp = TEMPLATE_NAME_COMPARATOR; } Collections.sort(templates, comp); return Collections.unmodifiableCollection(templates); }
From source file:edu.uci.ics.jung.graph.OrderedKAryTree.java
/** * @see edu.uci.ics.jung.graph.Hypergraph#getIncidentEdges(java.lang.Object) *//*ww w . ja v a 2 s . c o m*/ public Collection<E> getIncidentEdges(V vertex) { if (!containsVertex(vertex)) return null; ArrayList<E> edges = new ArrayList<E>(order + 1); VertexData v_data = vertex_data.get(vertex); if (v_data.parent_edge != null) edges.add(v_data.parent_edge); if (v_data.child_edges != null) { for (E edge : v_data.child_edges) if (edge != null) edges.add(edge); } if (edges.isEmpty()) return Collections.emptySet(); return Collections.unmodifiableCollection(edges); }
From source file:com.twinsoft.convertigo.engine.Context.java
public Collection<Connector> getOpenedConnectors() { return Collections.unmodifiableCollection(opened_connectors); }
From source file:edu.ksu.cis.indus.staticanalyses.concurrency.escape.AliasSet.java
/** * Retrieves the reference entities of this object. * /*ww w . ja v a2 s. c o m*/ * @return a collection of objects. */ Collection<Object> getIntraProcRefEntities() { final Collection<Object> _collection = find().intraThreadInterProcRefEntities; final Collection<Object> _result; if (_collection != null) { _result = Collections.unmodifiableCollection(_collection); } else { _result = null; } return _result; }
From source file:com.samczsun.helios.Helios.java
public static Collection<LoadedFile> getAllFiles() { return Collections.unmodifiableCollection(files.values()); }
From source file:eu.trentorise.smartcampus.permissionprovider.manager.ResourceAdapter.java
/** * @return */ public Collection<Service> getServices() { return Collections.unmodifiableCollection(serviceMap.values()); }
From source file:com.smartitengineering.cms.spi.impl.workspace.WorkspaceServiceImpl.java
@Override public Collection<VariationTemplate> getVariationsWithoutData(WorkspaceId id, ResourceSortCriteria criteria) { List<QueryParameter> params = new ArrayList<QueryParameter>(); final String info = WorkspaceObjectConverter.VAR_INFO; params.add(QueryParameterFactory.getPropProjectionParam(info)); params.add(getIdParam(id));//from w ww . ja v a 2 s . co m final PersistentWorkspace single = commonReadDao.getSingle(params); List<? extends VariationTemplate> templates = new ArrayList( single == null ? Collections.<VariationTemplate>emptyList() : single.getVariationTemplates()); if (templates.isEmpty()) { return Collections.emptyList(); } final Comparator<ResourceTemplate> comp; if (ResourceSortCriteria.BY_DATE.equals(criteria)) { comp = TEMPLATE_DATE_COMPARATOR; } else { comp = TEMPLATE_NAME_COMPARATOR; } Collections.sort(templates, comp); return Collections.unmodifiableCollection(templates); }
From source file:edu.ksu.cis.indus.staticanalyses.concurrency.escape.AliasSet.java
/** * Retrieves the lock entities of this object. * //from ww w. j a v a2 s. c o m * @return a collection of objects. */ Collection<Object> getLockEntities() { final Collection<Object> _collection = find().lockEntities; final Collection<Object> _result; if (_collection != null) { _result = Collections.unmodifiableCollection(_collection); } else { _result = null; } return _result; }