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


Java THashSet.addAll方法代碼示例

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


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

示例1: getAndClearDeletedPaths

import gnu.trove.THashSet; //導入方法依賴的package包/類
public Set<String> getAndClearDeletedPaths() {
  lockData();
  try {
    try {
      final THashSet<String> _paths = new THashSet<String>(FileUtil.PATH_HASHING_STRATEGY);
      _paths.addAll(myDeletedPaths);
      return _paths;
    }
    finally {
      myDeletedPaths.clear();
    }
  }
  finally {
    unlockData();
  }
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:17,代碼來源:FilesDelta.java

示例2: init

import gnu.trove.THashSet; //導入方法依賴的package包/類
@Override
public void init(PsiElement element){
  myFile = (XmlFile) element.getContainingFile();

  if (element instanceof XmlTag) {
    myTag = (XmlTag)element;
  } else {
    final XmlDocument document = myFile.getDocument();

    if (document != null) {
      myTag = document.getRootTag();
    }
  }

  if (myTag != null) {
    myTargetNamespace = myTag.getAttributeValue("targetNamespace");
  }

  final THashSet<PsiFile> dependenciesSet = new THashSet<PsiFile>();
  final Set<PsiFile> redefineProcessingSet = myRedefinedDescriptorsInProcessing.get();
  if (redefineProcessingSet != null) {
    dependenciesSet.addAll(redefineProcessingSet);
  }
  collectDependencies(myTag, myFile, dependenciesSet);
  dependencies = ArrayUtil.toObjectArray(dependenciesSet);
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:27,代碼來源:XmlNSDescriptorImpl.java

示例3: getAllLookupStrings

import gnu.trove.THashSet; //導入方法依賴的package包/類
@Override
public Set<String> getAllLookupStrings() {
  final Set<String> strings = getDelegate().getAllLookupStrings();
  final THashSet<String> result = new THashSet<String>();
  result.addAll(strings);
  result.add(getLookupString());
  return result;
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:9,代碼來源:JavaChainLookupElement.java

示例4: getDirtyFilesNoExpand

import gnu.trove.THashSet; //導入方法依賴的package包/類
@Override
public Set<FilePath> getDirtyFilesNoExpand() {
  final THashSet<FilePath> paths = new THashSet<FilePath>();
  for (THashSet<FilePath> filePaths : myDirtyFiles.values()) {
    paths.addAll(filePaths);
  }
  return paths;
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:9,代碼來源:VcsDirtyScopeImpl.java

示例5: getRecursivelyDirtyDirectories

import gnu.trove.THashSet; //導入方法依賴的package包/類
@Override
public Set<FilePath> getRecursivelyDirtyDirectories() {
  THashSet<FilePath> result = new THashSet<FilePath>();
  for(THashSet<FilePath> dirsByRoot: myDirtyDirectoriesRecursively.values()) {
    result.addAll(dirsByRoot);
  }
  return result;
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:9,代碼來源:VcsDirtyScopeImpl.java

示例6: mergeWith

import gnu.trove.THashSet; //導入方法依賴的package包/類
public RngXmlAttributeDescriptor mergeWith(RngXmlAttributeDescriptor d) {
  final QName name = d.myName.equals(UNKNOWN) ? myName : d.myName;

  final HashMap<String, String> values = new HashMap<String, String>(myValues);
  values.putAll(d.myValues);

  final THashSet<Locator> locations = new THashSet<Locator>(myDeclarations, HASHING_STRATEGY);
  locations.addAll(d.myDeclarations);

  return new RngXmlAttributeDescriptor(myElementDescriptor, name, values, myOptional || d.myOptional, locations.toArray(new Locator[locations.size()]));
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:12,代碼來源:RngXmlAttributeDescriptor.java

示例7: getChildrenBase

import gnu.trove.THashSet; //導入方法依賴的package包/類
@NotNull
@Override
public Collection<StructureViewTreeElement> getChildrenBase() {
  final NavigatablePsiElement element = getElement();
  final List<StructureViewTreeElement> result = new ArrayList<>();
  THashSet<AppleScriptComponent> myComponents = new THashSet<>();
  if (element != null && element instanceof AppleScriptFile) {
    if (!isRoot) {
      result.add(new AppleScriptStructureViewElement(element, true));
    }
    AppleScriptPsiElementImpl
        .processDeclarationsImpl(element, new AppleScriptComponentScopeProcessor(myComponents), ResolveState.initial(), null, null);
  } else if (element instanceof AppleScriptScriptObject) {
    List<AppleScriptComponent> myScriptComponents = AppleScriptResolveUtil.getNamedSubComponentsFor((AppleScriptScriptObject) element);
    myComponents.addAll(myScriptComponents);
  }

  for (AppleScriptComponent component : myComponents) {
    if (component instanceof AppleScriptHandlerPositionalParametersDefinition) {
      result.add(new AppleScriptStructureViewElement(component));
    } else if (component instanceof AppleScriptScriptPropertyDeclaration) {
      result.add(new AppleScriptStructureViewElement(component));
    } else if (component instanceof AppleScriptVarAccessDeclaration || component instanceof AppleScriptVarDeclarationListPart) {
      result.add(new AppleScriptStructureViewElement(component));
    } else if (component instanceof AppleScriptScriptObject && component != element) {
      result.add(new AppleScriptStructureViewElement(component, true));
    } else if (component instanceof AppleScriptHandler) {
      result.add(new AppleScriptStructureViewElement(component));
    } else if (component.getName() != null
        && !(component instanceof AppleScriptHandlerInterleavedParametersSelectorPart)//todo remove
        && component != element) {
      result.add(new AppleScriptStructureViewElement(component));
    }
  }

  result.sort((o1, o2) -> {
    PsiElement element1, element2;
    if (o1 instanceof AppleScriptStructureViewElement && o2 instanceof AppleScriptStructureViewElement) {
      element1 = ((AppleScriptStructureViewElement) o1).getElement();
      element2 = ((AppleScriptStructureViewElement) o2).getElement();
      if (element1 != null && element2 != null) {
        return element1.getTextOffset() - element2.getTextOffset();
      }
    }
    return 0;
  });

  return result;
}
 
開發者ID:ant-druha,項目名稱:AppleScript-IDEA,代碼行數:50,代碼來源:AppleScriptStructureViewElement.java

示例8: collectArtifactsToDownload

import gnu.trove.THashSet; //導入方法依賴的package包/類
private Map<MavenId, DownloadData> collectArtifactsToDownload(List<MavenExtraArtifactType> types) {
  Map<MavenId, DownloadData> result = new THashMap<MavenId, DownloadData>();

  THashSet<String> dependencyTypesFromSettings = new THashSet<String>();

  AccessToken accessToken = ReadAction.start();
  try {
    if (myProject.isDisposed()) return result;

    dependencyTypesFromSettings.addAll(MavenProjectsManager.getInstance(myProject).getImportingSettings().getDependencyTypesAsSet());
  }
  finally {
    accessToken.finish();
  }

  for (MavenProject eachProject : myMavenProjects) {
    List<MavenRemoteRepository> repositories = eachProject.getRemoteRepositories();

    for (MavenArtifact eachDependency : eachProject.getDependencies()) {
      if (myArtifacts != null && !myArtifacts.contains(eachDependency)) continue;

      if (MavenConstants.SCOPE_SYSTEM.equalsIgnoreCase(eachDependency.getScope())) continue;
      if (myProjectsTree.findProject(eachDependency.getMavenId()) != null) continue;

      String dependencyType = eachDependency.getType();

      if (!dependencyTypesFromSettings.contains(dependencyType)
          && !eachProject.getDependencyTypesFromImporters(SupportedRequestType.FOR_IMPORT).contains(dependencyType)) {
        continue;
      }

      MavenId id = eachDependency.getMavenId();
      DownloadData data = result.get(id);
      if (data == null) {
        data = new DownloadData();
        result.put(id, data);
      }
      data.repositories.addAll(repositories);
      for (MavenExtraArtifactType eachType : types) {
        Pair<String, String> classifierAndExtension = eachProject.getClassifierAndExtension(eachDependency, eachType);
        String classifier = eachDependency.getFullClassifier(classifierAndExtension.first);
        String extension = classifierAndExtension.second;
        data.classifiersWithExtensions.add(new DownloadElement(classifier, extension, eachType));
      }
    }
  }
  return result;
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:49,代碼來源:MavenArtifactDownloader.java


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