List of usage examples for java.util Collections emptyList
@SuppressWarnings("unchecked") public static final <T> List<T> emptyList()
From source file:net.sf.zekr.engine.audio.Audio.java
public List<String> getCurrentIdList() { if (CollectionUtils.isEmpty(currentList)) { return Collections.emptyList(); }// w w w .ja v a 2s . co m List<String> ret = new ArrayList<String>(); for (AudioData ad : currentList) { ret.add(ad.id); } return ret; }
From source file:org.oncoblocks.centromere.web.test.security.User.java
@Override public Collection<? extends GrantedAuthority> getAuthorities() { if (roles == null) { return Collections.emptyList(); }//from ww w .ja va 2 s. co m Set<GrantedAuthority> authorities = new HashSet<>(); for (String role : roles) { authorities.add(new SimpleGrantedAuthority(role)); } return authorities; }
From source file:no.dusken.aranea.service.ImageServiceImpl.java
public List<Image> getImagesByPerson(Person p, int number, int offset) { List<Image> list = Collections.emptyList(); try {// w w w.ja v a 2s . c o m Map<String, Object> map = new HashMap<String, Object>(); map.put("person", p); list = genericDao.getByNamedQuery("image_byPerson", map, offset, number); } catch (DataAccessException dae) { log.info("Unable to get images", dae); } return list; }
From source file:fi.vm.sade.organisaatio.dao.impl.YhteystietoArvoDAOImpl.java
@SuppressWarnings("unchecked") @Override/*from w ww . j a v a2 s .c o m*/ public List<YhteystietoArvo> findByOrganisaatio(Organisaatio org) { if (org.getId() == null) { return Collections.emptyList(); } return getEntityManager().createQuery("FROM " + YhteystietoArvo.class.getName() + " WHERE organisaatio=?") .setParameter(1, org).getResultList(); }
From source file:eu.over9000.cathode.data.parameters.GetFollowsSortBy.java
@Override public List<NameValuePair> buildParamPairs() { if (sortby == null) { return Collections.emptyList(); }//from ww w . j av a 2s . c om return Collections.singletonList(new BasicNameValuePair("sortby", sortby.name())); }
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. *//*from ww w .j a v a 2s .co m*/ protected Collection<Header> getCustomResponseHeaders() { return Collections.emptyList(); }
From source file:eu.over9000.cathode.data.parameters.StreamTypeOption.java
@Override public List<NameValuePair> buildParamPairs() { if (streamType == null) { return Collections.emptyList(); }/*w w w. j a v a 2 s. c o m*/ return Collections.singletonList(new BasicNameValuePair("stream_type", streamType.name())); }
From source file:infowall.infrastructure.service.GroovyExecutor.java
public String exec(File file) { try {//from w ww. j av a 2 s . co m ByteArrayOutputStream out = new ByteArrayOutputStream(); PrintStream wrappedOut = new PrintStream(out); Binding binding = new Binding(); binding.setProperty("out", wrappedOut); GroovyShell shell = new GroovyShell(binding); shell.run(file, Collections.emptyList()); return out.toString("UTF-8"); } catch (IOException e) { logger.error("Cannot exec groovy script " + file.getAbsolutePath(), e); } return null; }
From source file:com.mgmtp.perfload.perfalyzer.normalization.LoadProfileNormalizingStrategy.java
@Override public List<ChannelData> normalizeLine(final String line) { tokenizer.reset(line);//from w w w .j av a 2s . c om String[] tokens = tokenizer.getTokenArray(); String operation = tokens[1]; if (MARKER.equals(operation)) { return Collections.emptyList(); } return ImmutableList.of(new ChannelData(CHANNEL_BASE_NAME, operation, line)); }