Example usage for java.util Collections emptySet

List of usage examples for java.util Collections emptySet

Introduction

In this page you can find the example usage for java.util Collections emptySet.

Prototype

@SuppressWarnings("unchecked")
public static final <T> Set<T> emptySet() 

Source Link

Document

Returns an empty set (immutable).

Usage

From source file:de.cubeisland.engine.core.module.ModuleInfo.java

ModuleInfo(Core core) {
    this.path = Paths.get("CubeEngine.jar");
    this.sourceVersion = core.getSourceVersion();
    if (core instanceof BukkitCore) {
        this.main = ((BukkitCore) core).getDescription().getMain();
    } else {//w ww  .  j a v  a  2s . com
        this.main = "";
    }
    this.id = CoreModule.ID;
    this.name = CoreModule.NAME;
    this.description = "This is the core meta module.";
    this.version = core.getVersion();
    this.minCoreVersion = core.getVersion();
    this.dependencies = Collections.emptyMap();
    this.softDependencies = this.dependencies;
    this.pluginDependencies = Collections.emptySet();
    this.loadAfter = this.pluginDependencies;
    this.services = Collections.emptySet();
    this.softServices = Collections.emptySet();
    this.providedServices = Collections.emptySet();
}

From source file:grakn.core.graql.analytics.DegreeVertexProgram.java

@Override
public Set<MessageScope> getMessageScopes(final Memory memory) {
    return memory.isInitialIteration() ? Sets.newHashSet(messageScopeResourceIn, messageScopeOut)
            : Collections.emptySet();
}

From source file:de.cubeisland.engine.core.webapi.sender.ApiCommandSender.java

@Override
public Set<PermissionAttachmentInfo> getEffectivePermissions() {
    return Collections.emptySet();
}

From source file:org.echocat.marquardt.example.ServiceLoginIntegrationTest.java

private void givenSelfSignedCertificate() throws IOException {
    final UserInfo userInfo = new UserInfo(UUID.randomUUID());
    final Certificate<UserInfo> certificate = Certificate.create(getClientKeyProvider().getPublicKey(),
            getClientKeyProvider().getPublicKey(), Collections.emptySet(), userInfo);
    final byte[] selfSignedCertificate = getClientSigner().sign(certificate,
            getClientKeyProvider().getPrivateKey());
    _selfSignedCertificate = encodeBase64(selfSignedCertificate);
}

From source file:cop.raml.utils.Utils.java

@NotNull
public static Set<String> getParams(String uri) {
    if (StringUtils.isBlank(uri))
        return Collections.emptySet();

    Set<String> names = new LinkedHashSet<>();
    Matcher matcher = URI_PARAM.matcher(uri);

    while (matcher.find())
        names.add(matcher.group(1));/*  www  .  j av a2s .  co  m*/

    return names.isEmpty() ? Collections.emptySet() : names;
}

From source file:org.osiam.security.authentication.OsiamClientDetails.java

@Override
public Collection<GrantedAuthority> getAuthorities() {
    return Collections.emptySet();
}

From source file:io.pivotal.cla.data.repository.IndividualSignatureRepositoryTests.java

@Test
public void findSignaturesForUserGitHubLoginOnly() {
    user.setEmails(Collections.emptySet());

    assertThat(claService.findIndividualSignaturesFor(user, cla.getName())).isNotNull();
}

From source file:com.ge.predix.acs.service.policy.evaluation.ConditionEvaluationTest.java

@Test(dataProvider = "conditionsProvider")
public void testConditionEvaluationWithConstants(final List<Condition> conditions, final boolean expectedResult,
        final boolean throwsException) {
    PolicyEvaluationServiceImpl evaluationService = new PolicyEvaluationServiceImpl();
    Whitebox.setInternalState(evaluationService, "policySetValidator", this.policySetValidator);
    Set<Attribute> subjectAttributes = Collections.emptySet();
    ConditionShell conditionShell = new GroovyConditionShell();
    try {/*from   ww  w.jav a2  s .  c  om*/
        Assert.assertEquals(evaluationService.evaluateConditions(subjectAttributes, new HashSet<Attribute>(),
                "", conditions, "", conditionShell), expectedResult);
    } catch (Exception e) {
        if (throwsException) {
            Assert.assertTrue(e instanceof PolicyEvaluationException);
        }
    }
}

From source file:edu.cornell.mannlib.vitro.webapp.auth.identifier.common.CommonIdentifierBundleFactory.java

private Collection<? extends Identifier> createRootUserIdentifiers(HttpServletRequest req) {
    UserAccount user = LoginStatusBean.getCurrentUser(req);
    if ((user != null) && user.isRootUser()) {
        return Collections.singleton(new IsRootUser());
    } else {// w  w w .j ava 2 s. c om
        return Collections.emptySet();
    }
}

From source file:gov.ca.cwds.cals.service.ComplaintsService.java

/**
 * Get complaints by facility id./*from w  ww .  jav  a2s  .  c  o m*/
 */
public Set<ComplaintDto> getComplaintsByFacilityId(final String facilityNumber) {
    final String licenseNumber = calculateFacilityLicenseNumber(facilityNumber);
    if (licenseNumber == null) {
        return Collections.emptySet();
    }
    List<ComplaintDto> facilityComplaints = aggregateComplaintsFromDifferentSources(licenseNumber);
    if (CollectionUtils.isEmpty(facilityComplaints)) {
        return Collections.emptySet();
    }
    Set<ComplaintDto> sortedSet = new TreeSet<>(ComplaintComparator.getCompositeComparator());
    sortedSet.addAll(facilityComplaints);
    return sortedSet;
}