當前位置: 首頁>>代碼示例>>Java>>正文


Java SortedSet.removeAll方法代碼示例

本文整理匯總了Java中java.util.SortedSet.removeAll方法的典型用法代碼示例。如果您正苦於以下問題:Java SortedSet.removeAll方法的具體用法?Java SortedSet.removeAll怎麽用?Java SortedSet.removeAll使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在java.util.SortedSet的用法示例。


在下文中一共展示了SortedSet.removeAll方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: SuiteProperties

import java.util.SortedSet; //導入方法依賴的package包/類
/**
 * Creates a new instance of SuiteProperties
 */
public SuiteProperties(SuiteProject project, AntProjectHelper helper,
        PropertyEvaluator evaluator, Set<NbModuleProject> subModules) {
    super(helper, evaluator);
    this.project = project;
    refresh(subModules);
    this.disabledModules = getArrayProperty(evaluator, DISABLED_MODULES_PROPERTY);
    this.enabledClusters = getArrayProperty(evaluator, ENABLED_CLUSTERS_PROPERTY);
    if (enabledClusters.length == 0 && activePlatform != null) {
        // Compatibility.
        SortedSet<String> clusters = new TreeSet<String>();
        for (ModuleEntry module : activePlatform.getModules()) {
            clusters.add(module.getClusterDirectory().getName());
        }
        clusters.removeAll(Arrays.asList(getArrayProperty(evaluator, DISABLED_CLUSTERS_PROPERTY)));
        enabledClusters = new String[clusters.size()];
        int i = 0; for (String cluster : clusters) {
            enabledClusters[i++] = SingleModuleProperties.clusterBaseName(cluster);
        }
    }
    brandingModel = new SuiteBrandingModel(this);
    brandingModel.init();
}
 
開發者ID:apache,項目名稱:incubator-netbeans,代碼行數:26,代碼來源:SuiteProperties.java

示例2: build

import java.util.SortedSet; //導入方法依賴的package包/類
public List<CloudApplicationExtended> build(Set<String> mtaModulesInArchive, Set<String> allMtaModules, Set<String> deployedModules)
    throws SLException {
    List<CloudApplicationExtended> apps = new ArrayList<>();
    SortedSet<String> unresolvedMtaModules = new TreeSet<>(allMtaModules);
    initializeModulesDependecyTypes(deploymentDescriptor);
    for (Module module : handler.getSortedModules(deploymentDescriptor, SupportedParameters.DEPENDENCY_TYPE, DEPENDECY_TYPE_HARD)) {
        if (!mtaModulesInArchive.contains(module.getName()) || module.getType() == null) {
            if (deployedModules.contains(module.getName())){
                printMTAModuleNotFoundWarning(module.getName());
            }
            continue;
        }

        if (allMtaModules.contains(module.getName())) {
            ListUtil.addNonNull(apps, getApplication(module));
            unresolvedMtaModules.remove(module.getName());
        } else {
            throw new ContentException(Messages.ARCHIVE_MODULE_NOT_INTENDED_FOR_DEPLOYMENT, module.getName());
        }
    }
    unresolvedMtaModules.removeAll(deployedModules);
    if (!unresolvedMtaModules.isEmpty()) {
        throw new ContentException(Messages.UNRESOLVED_MTA_MODULES, unresolvedMtaModules);
    }
    return apps;
}
 
開發者ID:SAP,項目名稱:cf-mta-deploy-service,代碼行數:27,代碼來源:ApplicationsCloudModelBuilder.java

示例3: deregisterServiceProvider

import java.util.SortedSet; //導入方法依賴的package包/類
public static void deregisterServiceProvider(final String serviceProviderId)
{
    synchronized(serviceProviders)
    {
        final ServiceProvider deregisteredServiceProvider =
            serviceProviders.remove(serviceProviderIdentifier(serviceProviderId));

        if (deregisteredServiceProvider != null)
        {
            final SortedSet<URI> remainingDomains = new TreeSet<URI>();

            for (final ServiceProvider remainingServiceProvider : serviceProviders.values())
            {
                remainingDomains.addAll(getServiceProviderDomains(remainingServiceProvider));
            }

            final SortedSet<URI> removedServiceProviderDomains = getServiceProviderDomains(deregisteredServiceProvider);

            removedServiceProviderDomains.removeAll(remainingDomains);
            serviceProviderCatalog.removeDomains(removedServiceProviderDomains);
            serviceProviderCatalog.removeServiceProvider(deregisteredServiceProvider);
        }
        else
        {
            throw new WebApplicationException(Status.NOT_FOUND);
        }
    }
}
 
開發者ID:EricssonResearch,項目名稱:scott-eu,代碼行數:29,代碼來源:ServiceProviderCatalogSingleton.java

示例4: removeAll

import java.util.SortedSet; //導入方法依賴的package包/類
@Override
public synchronized boolean removeAll(Collection<?> c) {
  SortedSet<E> newSet = new TreeSet<E>(internalSet);
  boolean changed = newSet.removeAll(c);
  internalSet = newSet;
  return changed;
}
 
開發者ID:fengchen8086,項目名稱:ditb,代碼行數:8,代碼來源:SortedCopyOnWriteSet.java

示例5: doOperation

import java.util.SortedSet; //導入方法依賴的package包/類
/**
 * Utility that could be on SortedSet. Allows faster implementation than
 * what is in Java for doing addAll, removeAll, retainAll, (complementAll).
 * @param a first set
 * @param relation the relation filter, using ANY, CONTAINS, etc.
 * @param b second set
 * @return the new set
 */    
public static <T extends Object & Comparable<? super T>> SortedSet<? extends T> doOperation(SortedSet<T> a, int relation, SortedSet<T> b) {
    // TODO: optimize this as above
    TreeSet<? extends T> temp;
    switch (relation) {
        case ADDALL:
            a.addAll(b); 
            return a;
        case A:
            return a; // no action
        case B:
            a.clear(); 
            a.addAll(b); 
            return a;
        case REMOVEALL: 
            a.removeAll(b);
            return a;
        case RETAINALL: 
            a.retainAll(b);
            return a;
        // the following is the only case not really supported by Java
        // although all could be optimized
        case COMPLEMENTALL:
            temp = new TreeSet<T>(b);
            temp.removeAll(a);
            a.removeAll(b);
            a.addAll(temp);
            return a;
        case B_REMOVEALL:
            temp = new TreeSet<T>(b);
            temp.removeAll(a);
            a.clear();
            a.addAll(temp);
            return a;
        case NONE:
            a.clear();
            return a;
        default: 
            throw new IllegalArgumentException("Relation " + relation + " out of range");
    }
}
 
開發者ID:abhijitvalluri,項目名稱:fitnotifications,代碼行數:49,代碼來源:SortedSetRelation.java


注:本文中的java.util.SortedSet.removeAll方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。