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:ac.simons.spring.boot.test.autoconfigure.data.mongo.DataMongoTypeExcludeFilter.java

@Override
protected Set<Class<?>> getDefaultIncludes() {
    return Collections.emptySet();
}

From source file:hudson.plugins.codeviation.RepositoryView.java

public Set<String> getTags() {
    if (repository != null) {
        return repository.getAllTags();
    } else {// w  w  w. ja  v a  2s  .c  o m
        return Collections.emptySet();
    }
}

From source file:io.redlink.solrlib.spring.boot.autoconfigure.SolrLibEmbeddedAutoconfiguration.java

public SolrLibEmbeddedAutoconfiguration(SolrLibProperties props,
        ObjectProvider<Set<SolrCoreDescriptor>> coreDescriptors) {
    this.props = props;
    this.coreDescriptors = ObjectUtils.defaultIfNull(coreDescriptors.getIfAvailable(), Collections.emptySet());
}

From source file:org.arrow.model.gateway.AbstractGateway.java

public Set<Flow> getOutgoingFlows() {
    if (outgoingFlows == null) {
        return Collections.emptySet();
    }/*from   www  . ja v  a 2 s  . c om*/
    return new HashSet<>(outgoingFlows);
}

From source file:io.redlink.solrlib.spring.boot.autoconfigure.SolrLibStandaloneAutoconfiguration.java

public SolrLibStandaloneAutoconfiguration(SolrLibProperties props,
        ObjectProvider<Set<SolrCoreDescriptor>> coreDescriptors) {
    this.props = props;
    this.coreDescriptors = ObjectUtils.defaultIfNull(coreDescriptors.getIfAvailable(), Collections.emptySet());
}

From source file:ditl.sim.pnt.InfectionReport.java

private void queueUpdate(long time) {
    update_bus.queue(time, Collections.emptySet());
}

From source file:io.redlink.solrlib.spring.boot.autoconfigure.SolrLibCloudAutoconfiguration.java

public SolrLibCloudAutoconfiguration(SolrLibProperties props,
        ObjectProvider<Set<SolrCoreDescriptor>> coreDescriptors) {
    this.props = props;
    this.coreDescriptors = ObjectUtils.defaultIfNull(coreDescriptors.getIfAvailable(), Collections.emptySet());
}

From source file:Main.java

/**
 * Copies the given {@link Set} into a new {@link Set}.<br>
 * //from  ww w  .  ja va 2s.co m
 * 
 * @param <T>
 *            the type of the entries of the set
 * @param data
 *            the given set
 * @return If the given set was empty, a {@link Collections#emptySet()} is
 *         returned<br>
 *         If the given set contained only one element, a
 *         {@link Collections#singleton(Object)}, containing said element,
 *         is returned <br>
 *         If the given set contained more than one element, a
 *         {@link Collections#unmodifiableSet(Set)}, containing the
 *         elements of the given set, is returned.
 */
public static <T> Set<T> copy(Set<T> data) {
    final int size = data.size();

    switch (size) {
    case 0:
        return Collections.emptySet();
    case 1:
        return Collections.singleton(data.iterator().next());
    default:
        return Collections.unmodifiableSet(new HashSet<T>(data));
    }
}

From source file:io.cloudslang.lang.systemtests.BindingScopeTest.java

@Test
public void testStepPublishValues() throws Exception {
    URL resource = getClass().getResource("/yaml/binding_scope_flow.sl");
    URI operation = getClass().getResource("/yaml/binding_scope_op.sl").toURI();
    Set<SlangSource> path = Sets.newHashSet(SlangSource.fromFile(operation));
    CompilationArtifact compilationArtifact = slang.compile(SlangSource.fromFile(resource.toURI()), path);

    Map<String, Value> userInputs = Collections.emptyMap();
    Set<SystemProperty> systemProperties = Collections.emptySet();

    // trigger ExecutionPlan
    RuntimeInformation runtimeInformation = triggerWithData(compilationArtifact, userInputs, systemProperties);

    Map<String, StepData> executionData = runtimeInformation.getSteps();

    StepData stepData = executionData.get(FIRST_STEP_PATH);
    Assert.assertNotNull("step data is null", stepData);

    verifyStepPublishValues(stepData);//from w w w . jav a2  s .c  o  m
}

From source file:ddf.catalog.validation.impl.AttributeValidatorRegistryImpl.java

@Override
public Set<AttributeValidator> getValidators(final String attributeName) {
    Preconditions.checkArgument(attributeName != null, "The attribute name cannot be null.");

    return Collections
            .unmodifiableSet(attributeValidatorMap.getOrDefault(attributeName, Collections.emptySet()));
}