List of usage examples for java.util Collections EMPTY_SET
Set EMPTY_SET
To view the source code for java.util Collections EMPTY_SET.
Click Source Link
From source file:org.apache.tajo.storage.jdbc.JdbcMetadataProviderBase.java
@Override public Collection<String> getSchemas() { return Collections.EMPTY_SET; }
From source file:io.cfp.entity.User.java
@Transient public Set<String> getRoles() { return roles != null ? roles : Collections.EMPTY_SET; }
From source file:org.openmrs.web.controller.user.RoleFormController.java
/** * @see org.springframework.web.servlet.mvc.AbstractFormController#processFormSubmission(javax.servlet.http.HttpServletRequest, * javax.servlet.http.HttpServletResponse, java.lang.Object, * org.springframework.validation.BindException) *//*from ww w . ja va2s . com*/ @SuppressWarnings("unchecked") protected ModelAndView processFormSubmission(HttpServletRequest request, HttpServletResponse response, Object obj, BindException errors) throws Exception { Role role = (Role) obj; String[] inheritiedRoles = request.getParameterValues("inheritedRoles"); if (inheritiedRoles == null) { role.setInheritedRoles(Collections.EMPTY_SET); } String[] privileges = request.getParameterValues("privileges"); if (privileges == null) { role.setPrivileges((Set) (Collections.emptySet())); } return super.processFormSubmission(request, response, role, errors); }
From source file:org.sonar.batch.InMemoryPomCreator.java
public MavenProject create() { File workDir = project.getWorkDir(); String buildDirectory = workDir.getAbsolutePath() + "/target"; Properties properties = project.getProperties(); if (project.getBinaries().size() == 0) { project.addBinaryDir(buildDirectory + "/classes"); }/*from w w w . j a v a 2 s. c om*/ final MavenProject pom = new MavenProject() { /** * This allows to specify base directory without specifying location of a pom.xml */ @Override public File getBasedir() { return project.getBaseDir(); }; /** * This allows to specify project classpath (binaries + libraries). */ @Override public List<String> getCompileClasspathElements() throws DependencyResolutionRequiredException { List<String> cp = new ArrayList<String>(); cp.addAll(project.getBinaries()); cp.addAll(project.getLibraries()); return cp; } }; String key = getPropertyOrDie(properties, CoreProperties.PROJECT_KEY_PROPERTY); String[] keys = key.split(":"); pom.setGroupId(keys[0]); pom.setArtifactId(keys[1]); pom.setVersion(getPropertyOrDie(properties, CoreProperties.PROJECT_VERSION_PROPERTY)); pom.setName(properties.getProperty(CoreProperties.PROJECT_NAME_PROPERTY, "Unnamed - " + key)); pom.setDescription(properties.getProperty(CoreProperties.PROJECT_DESCRIPTION_PROPERTY, "")); pom.getModel().setProperties(properties); pom.setArtifacts(Collections.EMPTY_SET); // Configure fake directories pom.getBuild().setDirectory(buildDirectory); pom.getBuild().setOutputDirectory(project.getBinaries().get(0)); Reporting reporting = new Reporting(); String reportingOutputDirectory = buildDirectory + "/site"; reporting.setOutputDirectory(reportingOutputDirectory); pom.setReporting(reporting); // Configure source directories for (String dir : project.getSourceDirs()) { pom.addCompileSourceRoot(dir); } // Configure test directories for (String dir : project.getTestDirs()) { pom.addTestCompileSourceRoot(dir); } return pom; }
From source file:org.apache.drill.exec.store.kudu.KuduStoragePlugin.java
@Override public Set<StoragePluginOptimizerRule> getOptimizerRules(OptimizerRulesContext optimizerRulesContext) { return Collections.EMPTY_SET; }
From source file:com.adobe.ags.curly.test.ErrorBehaviorTest.java
@Test public void testHappyPath() throws IOException, ParseException { List<Action> actions = Arrays.asList(successAction(), successAction(), successAction(), successAction(), successAction());/*from ww w . j a va 2 s . co m*/ ActionGroupRunner runner = new ActionGroupRunner("Happy Test", ignore -> client, actions, Collections.EMPTY_MAP, Collections.EMPTY_SET); runner.run(); assertResults(runner.getResult(), true, true); }
From source file:org.apache.james.protocols.pop3.core.StlsCmdHandler.java
/** * @see org.apache.james.pop3server.core.CapaCapability#getImplementedCapabilities(org.apache.james.pop3server.POP3Session) */// w w w.ja va2 s .c o m @SuppressWarnings("unchecked") public Set<String> getImplementedCapabilities(POP3Session session) { if (session.isStartTLSSupported() && session.getHandlerState() == POP3Session.AUTHENTICATION_READY) { return CAPS; } else { return Collections.EMPTY_SET; } }
From source file:net.landora.video.utils.UIUtils.java
public static Collection<Object> createCompleteContext(Collection<?> context) { if (context == null || context.isEmpty()) { return Collections.EMPTY_SET; }// ww w . ja v a2 s .co m Collection<Object> result = new LinkedHashSet<Object>(); for (Object obj : context) { addContentObject(obj, result); } return result; }
From source file:org.wings.resource.ReloadResource.java
/** * The HTTP header parameteres attached to this dynamic code ressource. * This <b>static</b> list will by default contain entries to disable caching * on the server side. Call <code>getHeaders().clear()</code> to avoid this * i.e. if you want to enable back buttons. * * @return A <code>Collection</code> of {@link org.wings.Resource.HeaderEntry} objects. *//*from ww w. j a va 2s . c om*/ public Collection<HttpHeader> getHeaders() { if (getFrame().isNoCaching()) return DEFAULT_CODE_HEADER; else return Collections.EMPTY_SET; }
From source file:org.apache.tapestry.bean.BeanProvider.java
/** @since 1.0.6 **/ public Collection getBeanNames() { if (_beanNames == null) { Collection c = _component.getSpecification().getBeanNames(); if (c == null || c.isEmpty()) _beanNames = Collections.EMPTY_SET; else/*from w ww. j a v a 2 s .c o m*/ _beanNames = Collections.unmodifiableSet(new HashSet(c)); } return _beanNames; }