当前位置: 首页>>代码示例>>Java>>正文


Java CaseInsensitiveStringHashingStrategy类代码示例

本文整理汇总了Java中com.intellij.util.text.CaseInsensitiveStringHashingStrategy的典型用法代码示例。如果您正苦于以下问题:Java CaseInsensitiveStringHashingStrategy类的具体用法?Java CaseInsensitiveStringHashingStrategy怎么用?Java CaseInsensitiveStringHashingStrategy使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


CaseInsensitiveStringHashingStrategy类属于com.intellij.util.text包,在下文中一共展示了CaseInsensitiveStringHashingStrategy类的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: setupEnvironment

import com.intellij.util.text.CaseInsensitiveStringHashingStrategy; //导入依赖的package包/类
protected void setupEnvironment(@NotNull Map<String, String> environment) {
  environment.clear();

  if (myParentEnvironmentType != ParentEnvironmentType.NONE) {
    environment.putAll(getParentEnvironment());
  }

  if (!myEnvParams.isEmpty()) {
    if (SystemInfo.isWindows) {
      THashMap<String, String> envVars = new THashMap<String, String>(CaseInsensitiveStringHashingStrategy.INSTANCE);
      envVars.putAll(environment);
      envVars.putAll(myEnvParams);
      environment.clear();
      environment.putAll(envVars);
    }
    else {
      environment.putAll(myEnvParams);
    }
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:21,代码来源:GeneralCommandLine.java

示例2: FileTypeAssocTable

import com.intellij.util.text.CaseInsensitiveStringHashingStrategy; //导入依赖的package包/类
private FileTypeAssocTable(Map<String, T> extensionMappings, Map<String, T> exactFileNameMappings, Map<String, T> exactFileNameAnyCaseMappings, List<Pair<FileNameMatcher, T>> matchingMappings) {
  myExtensionMappings = new THashMap<String, T>(extensionMappings);
  myExactFileNameMappings = new THashMap<String, T>(exactFileNameMappings);
  myExactFileNameAnyCaseMappings = new THashMap<String, T>(exactFileNameAnyCaseMappings, CaseInsensitiveStringHashingStrategy.INSTANCE) {
    @Override
    public T remove(Object key) {
      T removed = super.remove(key);
      myHasAnyCaseExactMappings = size() > 0;
      return removed;
    }

    @Override
    public T put(String key, T value) {
      T result = super.put(key, value);
      myHasAnyCaseExactMappings = true;
      return result;
    }
  };
  myMatchingMappings = new ArrayList<Pair<FileNameMatcher, T>>(matchingMappings);
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:21,代码来源:FileTypeAssocTable.java

示例3: setupEnvironment

import com.intellij.util.text.CaseInsensitiveStringHashingStrategy; //导入依赖的package包/类
void setupEnvironment(final Map<String, String> environment) {
  environment.clear();

  if (myPassParentEnvironment) {
    environment.putAll(EnvironmentUtil.getEnvironmentMap());
  }

  if (!myEnvParams.isEmpty()) {
    if (SystemInfo.isWindows) {
      THashMap<String, String> envVars = new THashMap<String, String>(CaseInsensitiveStringHashingStrategy.INSTANCE);
      envVars.putAll(environment);
      envVars.putAll(myEnvParams);
      environment.clear();
      environment.putAll(envVars);
    }
    else {
      environment.putAll(myEnvParams);
    }
  }
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:21,代码来源:GeneralCommandLine.java

示例4: compute

import com.intellij.util.text.CaseInsensitiveStringHashingStrategy; //导入依赖的package包/类
@NotNull
@Override
protected Map<String, HeaderParser> compute() {
  Map<String, HeaderParser> map = new THashMap<String, HeaderParser>(CaseInsensitiveStringHashingStrategy.INSTANCE);
  for (HeaderParserProvider provider : Extensions.getExtensions(HeaderParserProvider.EP_NAME)) {
    map.putAll(provider.getHeaderParsers());
  }
  return map;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:10,代码来源:HeaderParserRepository.java

示例5: createStringIntMap

import com.intellij.util.text.CaseInsensitiveStringHashingStrategy; //导入依赖的package包/类
@NotNull
private static ObjectIntHashMap<String> createStringIntMap(int initialCapacity) {
  if (initialCapacity == -1) {
    initialCapacity = 4;
  }
  return SystemInfo.isFileSystemCaseSensitive
         ? new ObjectIntHashMap<String>(initialCapacity)
         : new ObjectIntHashMap<String>(initialCapacity, CaseInsensitiveStringHashingStrategy.INSTANCE);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:10,代码来源:SourceResolver.java

示例6: addAdoptedName

import com.intellij.util.text.CaseInsensitiveStringHashingStrategy; //导入依赖的package包/类
void addAdoptedName(String name, boolean caseSensitive) {
  if (myAdoptedNames == null) {
    //noinspection unchecked
    myAdoptedNames = new THashSet<String>(0, caseSensitive ? TObjectHashingStrategy.CANONICAL : CaseInsensitiveStringHashingStrategy.INSTANCE);
  }
  myAdoptedNames.add(name);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:8,代码来源:VfsData.java

示例7: getSystemEnv

import com.intellij.util.text.CaseInsensitiveStringHashingStrategy; //导入依赖的package包/类
private static Map<String, String> getSystemEnv() {
  if (SystemInfo.isWindows) {
    return unmodifiableMap(new THashMap<String, String>(System.getenv(), CaseInsensitiveStringHashingStrategy.INSTANCE));
  }
  else {
    return System.getenv();
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:9,代码来源:EnvironmentUtil.java

示例8: compute

import com.intellij.util.text.CaseInsensitiveStringHashingStrategy; //导入依赖的package包/类
@NotNull
@Override
protected Map<String, String> compute() {
  Map<String, String> env = ourEnvironment.getValue();
  if (SystemInfo.isWindows) {
    env = Collections.unmodifiableMap(new THashMap<String, String>(env, CaseInsensitiveStringHashingStrategy.INSTANCE));
  }
  return env;
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:10,代码来源:EnvironmentUtil.java

示例9: setupEnvironment

import com.intellij.util.text.CaseInsensitiveStringHashingStrategy; //导入依赖的package包/类
protected void setupEnvironment(@Nonnull Map<String, String> environment) {
  environment.clear();

  if (myParentEnvironmentType != ParentEnvironmentType.NONE) {
    environment.putAll(getParentEnvironment());
  }

  if (SystemInfo.isUnix) {
    File workDirectory = getWorkDirectory();
    if (workDirectory != null) {
      environment.put("PWD", FileUtil.toSystemDependentName(workDirectory.getAbsolutePath()));
    }
  }

  if (!myEnvParams.isEmpty()) {
    if (SystemInfo.isWindows) {
      THashMap<String, String> envVars = new THashMap<>(CaseInsensitiveStringHashingStrategy.INSTANCE);
      envVars.putAll(environment);
      envVars.putAll(myEnvParams);
      environment.clear();
      environment.putAll(envVars);
    }
    else {
      environment.putAll(myEnvParams);
    }
  }
}
 
开发者ID:consulo,项目名称:consulo,代码行数:28,代码来源:GeneralCommandLine.java

示例10: MyTHashMap

import com.intellij.util.text.CaseInsensitiveStringHashingStrategy; //导入依赖的package包/类
public MyTHashMap() {
  super(SystemInfo.isWindows ? CaseInsensitiveStringHashingStrategy.INSTANCE : ContainerUtil.<String>canonicalStrategy());
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:4,代码来源:GeneralCommandLine.java

示例11: getHashCode

import com.intellij.util.text.CaseInsensitiveStringHashingStrategy; //导入依赖的package包/类
@Override
public int getHashCode(String value) {
  return CaseInsensitiveStringHashingStrategy.INSTANCE.computeHashCode(value);
}
 
开发者ID:consulo,项目名称:consulo,代码行数:5,代码来源:VcsLogPathsIndex.java

示例12: isEqual

import com.intellij.util.text.CaseInsensitiveStringHashingStrategy; //导入依赖的package包/类
@Override
public boolean isEqual(String val1, String val2) {
  return CaseInsensitiveStringHashingStrategy.INSTANCE.equals(val1, val2);
}
 
开发者ID:consulo,项目名称:consulo,代码行数:5,代码来源:VcsLogPathsIndex.java


注:本文中的com.intellij.util.text.CaseInsensitiveStringHashingStrategy类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。