本文整理汇总了Java中com.intellij.util.text.CaseInsensitiveStringHashingStrategy.INSTANCE属性的典型用法代码示例。如果您正苦于以下问题:Java CaseInsensitiveStringHashingStrategy.INSTANCE属性的具体用法?Java CaseInsensitiveStringHashingStrategy.INSTANCE怎么用?Java CaseInsensitiveStringHashingStrategy.INSTANCE使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类com.intellij.util.text.CaseInsensitiveStringHashingStrategy
的用法示例。
在下文中一共展示了CaseInsensitiveStringHashingStrategy.INSTANCE属性的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: setupEnvironment
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);
}
}
}
示例2: FileTypeAssocTable
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);
}
示例3: setupEnvironment
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);
}
}
}
示例4: compute
@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;
}
示例5: createStringIntMap
@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);
}
示例6: addAdoptedName
void addAdoptedName(String name, boolean caseSensitive) {
if (myAdoptedNames == null) {
//noinspection unchecked
myAdoptedNames = new THashSet<String>(0, caseSensitive ? TObjectHashingStrategy.CANONICAL : CaseInsensitiveStringHashingStrategy.INSTANCE);
}
myAdoptedNames.add(name);
}
示例7: setupEnvironment
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);
}
}
}
示例8: MyTHashMap
public MyTHashMap() {
super(SystemInfo.isWindows ? CaseInsensitiveStringHashingStrategy.INSTANCE : ContainerUtil.<String>canonicalStrategy());
}