List of usage examples for java.util Collections emptyList
@SuppressWarnings("unchecked") public static final <T> List<T> emptyList()
From source file:de.itsvs.cwtrpc.controller.PreparedCacheControlUriConfigBuilder.java
public List<PreparedCacheControlUriConfig> build(List<CacheControlUriConfig> uriConfigs) { final List<PreparedCacheControlUriConfig> preparedUriConfigs; if (uriConfigs.isEmpty()) { return Collections.emptyList(); }//from www .ja v a 2s .co m preparedUriConfigs = new ArrayList<PreparedCacheControlUriConfig>(); for (CacheControlUriConfig uriConfig : uriConfigs) { preparedUriConfigs.add(build(uriConfig)); } return preparedUriConfigs; }
From source file:pl.edu.agh.iosr.lsf.dao.DatabaseHelper.java
public static List<String> loadWords() { try {//from www . j a v a2 s. c o m return loadWords(DatabaseHelper.class.getClassLoader().getResourceAsStream("words.txt")); } catch (IOException e) { e.printStackTrace(); } return Collections.emptyList(); }
From source file:com.facebook.stetho.inspector.protocol.module.CSS.java
@ChromeDevtoolsMethod public JsonRpcResult getSupportedCSSProperties(JsonRpcPeer peer, JSONObject params) { GetSupportedCSSPropertiesResponse response = new GetSupportedCSSPropertiesResponse(); response.cssProperties = Collections.emptyList(); return response; }
From source file:by.creepid.docsreporter.context.meta.ImagesMetadataFiller.java
protected List<String> getAliases(Class<?> iterClass, Map<String, Class<?>> iteratorNames) { if (iteratorNames == null || iteratorNames.isEmpty()) { return Collections.emptyList(); }//ww w .ja v a 2 s . co m List<String> aliases = new ArrayList<>(); Set<Map.Entry<String, Class<?>>> entries = iteratorNames.entrySet(); for (Map.Entry<String, Class<?>> entry : entries) { if (entry.getValue() == iterClass) { aliases.add(entry.getKey()); } } return aliases; }
From source file:cz.muni.fi.mir.db.dao.impl.RevisionDAOImpl.java
@Override public List<Revision> getAllRevisions() { List<Revision> result = Collections.emptyList(); try {//from w w w .j a v a 2s.c o m result = entityManager.createQuery("SELECT r FROM revision r", Revision.class).getResultList(); } catch (NoResultException nre) { logger.debug(nre); } return result; }
From source file:com.haulmont.cuba.restapi.CommitRequest.java
public Collection getCommitInstances() { return commitInstances == null ? Collections.emptyList() : commitInstances; }
From source file:com.gooddata.md.report.GridReportDefinitionContentTest.java
@Test public void testSerialization() throws Exception { final GridReportDefinitionContent def = new GridReportDefinitionContent( new Grid(Collections.emptyList(), Collections.emptyList(), Collections.emptyList())); assertThat(def, jsonEquals(resource("md/report/gridReportDefinitionContent-input.json"))); }
From source file:no.dusken.momus.authentication.AuthUserDetails.java
@Override public Collection<? extends GrantedAuthority> getAuthorities() { return Collections.emptyList(); }
From source file:org.openmrs.module.pharmacyapi.api.drugitem.service.DrugWrapperServiceImpl.java
@SuppressWarnings("unchecked") @Override/* ww w .j a v a2 s . c o m*/ public List<Drug> findDrugsByNameLike(String phrase) { if (phrase == null || phrase.length() < 3) { return Collections.emptyList(); } final Criteria searchCriteria = this.sessionFactory.getCurrentSession().createCriteria(Drug.class, "drug"); searchCriteria.add(Restrictions.eq("drug.retired", false)); searchCriteria.add(Restrictions.like("drug.name", phrase, MatchMode.START)); return searchCriteria.list(); }
From source file:org.georchestra.security.HeaderProvider.java
/** * Called by {@link HeadersManagementStrategy#configureRequestHeaders(HttpServletRequest, HttpRequestBase)} to allow * extra headers to be added to the copied headers. *//* w w w . j a va 2 s . c o m*/ protected Collection<Header> getCustomRequestHeaders(HttpSession session, HttpServletRequest originalRequest) { return Collections.emptyList(); }