Java Code Examples for org.gradle.util.WrapUtil#toSet()

The following examples show how to use org.gradle.util.WrapUtil#toSet() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: DefaultConf2ScopeMappingContainer.java    From pushfish-android with BSD 2-Clause "Simplified" License 5 votes vote down vote up
private Set<Conf2ScopeMapping> getMappingsWithHighestPriority(Collection<Configuration> configurations) {
    Integer lastPriority = null;
    Set<Conf2ScopeMapping> result = new HashSet<Conf2ScopeMapping>();
    for (Conf2ScopeMapping conf2ScopeMapping : getMappingsForConfigurations(configurations)) {
        Integer thisPriority = conf2ScopeMapping.getPriority();
        if (lastPriority != null && lastPriority.equals(thisPriority)) {
            result.add(conf2ScopeMapping);
        } else if (lastPriority == null || (thisPriority != null && lastPriority < thisPriority)) {
            lastPriority = thisPriority;
            result = WrapUtil.toSet(conf2ScopeMapping);
        }
    }
    return result;
}
 
Example 2
Source File: BasePomFilterContainer.java    From pushfish-android with BSD 2-Clause "Simplified" License 5 votes vote down vote up
public Iterable<PomFilter> getActivePomFilters() {
    Iterable<PomFilter> activeArtifactPoms;
    if (pomFilters.size() == 0 && getDefaultPomFilter() != null) {
        activeArtifactPoms = WrapUtil.toSet(getDefaultPomFilter());
    } else {
        activeArtifactPoms = pomFilters.values();
    }
    return activeArtifactPoms;
}
 
Example 3
Source File: DefaultConf2ScopeMappingContainer.java    From pushfish-android with BSD 2-Clause "Simplified" License 5 votes vote down vote up
private Set<Conf2ScopeMapping> getMappingsWithHighestPriority(Collection<Configuration> configurations) {
    Integer lastPriority = null;
    Set<Conf2ScopeMapping> result = new HashSet<Conf2ScopeMapping>();
    for (Conf2ScopeMapping conf2ScopeMapping : getMappingsForConfigurations(configurations)) {
        Integer thisPriority = conf2ScopeMapping.getPriority();
        if (lastPriority != null && lastPriority.equals(thisPriority)) {
            result.add(conf2ScopeMapping);
        } else if (lastPriority == null || (thisPriority != null && lastPriority < thisPriority)) {
            lastPriority = thisPriority;
            result = WrapUtil.toSet(conf2ScopeMapping);
        }
    }
    return result;
}
 
Example 4
Source File: BasePomFilterContainer.java    From pushfish-android with BSD 2-Clause "Simplified" License 5 votes vote down vote up
public Iterable<PomFilter> getActivePomFilters() {
    Iterable<PomFilter> activeArtifactPoms;
    if (pomFilters.size() == 0 && getDefaultPomFilter() != null) {
        activeArtifactPoms = WrapUtil.toSet(getDefaultPomFilter());
    } else {
        activeArtifactPoms = pomFilters.values();
    }
    return activeArtifactPoms;
}
 
Example 5
Source File: DefaultConf2ScopeMappingContainer.java    From Pushjet-Android with BSD 2-Clause "Simplified" License 5 votes vote down vote up
private Set<Conf2ScopeMapping> getMappingsWithHighestPriority(Collection<Configuration> configurations) {
    Integer lastPriority = null;
    Set<Conf2ScopeMapping> result = new HashSet<Conf2ScopeMapping>();
    for (Conf2ScopeMapping conf2ScopeMapping : getMappingsForConfigurations(configurations)) {
        Integer thisPriority = conf2ScopeMapping.getPriority();
        if (lastPriority != null && lastPriority.equals(thisPriority)) {
            result.add(conf2ScopeMapping);
        } else if (lastPriority == null || (thisPriority != null && lastPriority < thisPriority)) {
            lastPriority = thisPriority;
            result = WrapUtil.toSet(conf2ScopeMapping);
        }
    }
    return result;
}
 
Example 6
Source File: BasePomFilterContainer.java    From Pushjet-Android with BSD 2-Clause "Simplified" License 5 votes vote down vote up
public Iterable<PomFilter> getActivePomFilters() {
    Iterable<PomFilter> activeArtifactPoms;
    if (pomFilters.size() == 0 && getDefaultPomFilter() != null) {
        activeArtifactPoms = WrapUtil.toSet(getDefaultPomFilter());
    } else {
        activeArtifactPoms = pomFilters.values();
    }
    return activeArtifactPoms;
}
 
Example 7
Source File: DefaultConf2ScopeMappingContainer.java    From Pushjet-Android with BSD 2-Clause "Simplified" License 5 votes vote down vote up
private Set<Conf2ScopeMapping> getMappingsWithHighestPriority(Collection<Configuration> configurations) {
    Integer lastPriority = null;
    Set<Conf2ScopeMapping> result = new HashSet<Conf2ScopeMapping>();
    for (Conf2ScopeMapping conf2ScopeMapping : getMappingsForConfigurations(configurations)) {
        Integer thisPriority = conf2ScopeMapping.getPriority();
        if (lastPriority != null && lastPriority.equals(thisPriority)) {
            result.add(conf2ScopeMapping);
        } else if (lastPriority == null || (thisPriority != null && lastPriority < thisPriority)) {
            lastPriority = thisPriority;
            result = WrapUtil.toSet(conf2ScopeMapping);
        }
    }
    return result;
}
 
Example 8
Source File: BasePomFilterContainer.java    From Pushjet-Android with BSD 2-Clause "Simplified" License 5 votes vote down vote up
public Iterable<PomFilter> getActivePomFilters() {
    Iterable<PomFilter> activeArtifactPoms;
    if (pomFilters.size() == 0 && getDefaultPomFilter() != null) {
        activeArtifactPoms = WrapUtil.toSet(getDefaultPomFilter());
    } else {
        activeArtifactPoms = pomFilters.values();
    }
    return activeArtifactPoms;
}
 
Example 9
Source File: DetachedConfigurationsProvider.java    From pushfish-android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
public Set<Configuration> getAll() {
    return WrapUtil.toSet(theOnlyConfiguration);
}
 
Example 10
Source File: DetachedConfigurationsProvider.java    From pushfish-android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
public Set<Configuration> getAll() {
    return WrapUtil.toSet(theOnlyConfiguration);
}
 
Example 11
Source File: DetachedConfigurationsProvider.java    From Pushjet-Android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
public Set<Configuration> getAll() {
    return WrapUtil.toSet(theOnlyConfiguration);
}
 
Example 12
Source File: DetachedConfigurationsProvider.java    From Pushjet-Android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
public Set<Configuration> getAll() {
    return WrapUtil.toSet(theOnlyConfiguration);
}