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


Java TObjectIntHashMap.size方法代码示例

本文整理汇总了Java中gnu.trove.TObjectIntHashMap.size方法的典型用法代码示例。如果您正苦于以下问题:Java TObjectIntHashMap.size方法的具体用法?Java TObjectIntHashMap.size怎么用?Java TObjectIntHashMap.size使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在gnu.trove.TObjectIntHashMap的用法示例。


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

示例1: GrIntroduceParameterDialog

import gnu.trove.TObjectIntHashMap; //导入方法依赖的package包/类
public GrIntroduceParameterDialog(IntroduceParameterInfo info) {
  super(info.getProject(), true);
  myInfo = info;
  myProject = info.getProject();
  myCanIntroduceSimpleParameter = GroovyIntroduceParameterUtil.findExpr(myInfo) != null ||
                                  GroovyIntroduceParameterUtil.findVar(myInfo) != null ||
                                  findStringPart() != null;

  TObjectIntHashMap<GrParameter> parametersToRemove = GroovyIntroduceParameterUtil.findParametersToRemove(info);
  toRemoveCBs = new TObjectIntHashMap<JCheckBox>(parametersToRemove.size());
  for (Object p : parametersToRemove.keys()) {
    JCheckBox cb = new JCheckBox(GroovyRefactoringBundle.message("remove.parameter.0.no.longer.used", ((GrParameter)p).getName()));
    toRemoveCBs.put(cb, parametersToRemove.get((GrParameter)p));
    cb.setSelected(true);
  }

  init();
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:19,代码来源:GrIntroduceParameterDialog.java

示例2: GrIntroduceParameterDialog

import gnu.trove.TObjectIntHashMap; //导入方法依赖的package包/类
public GrIntroduceParameterDialog(IntroduceParameterInfo info) {
  super(info.getProject(), true);
  myInfo = info;
  myProject = info.getProject();
  myCanIntroduceSimpleParameter = findExpr() != null || findVar() != null || findStringPart() != null;

  TObjectIntHashMap<GrParameter> parametersToRemove = GroovyIntroduceParameterUtil.findParametersToRemove(info);
  toRemoveCBs = new TObjectIntHashMap<JCheckBox>(parametersToRemove.size());
  for (Object p : parametersToRemove.keys()) {
    JCheckBox cb = new JCheckBox(GroovyRefactoringBundle.message("remove.parameter.0.no.longer.used", ((GrParameter)p).getName()));
    toRemoveCBs.put(cb, parametersToRemove.get((GrParameter)p));
    cb.setSelected(true);
  }

  init();
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:17,代码来源:GrIntroduceParameterDialog.java

示例3: OrderMap

import gnu.trove.TObjectIntHashMap; //导入方法依赖的package包/类
private OrderMap(@NotNull TObjectIntHashMap<HighlightSeverity> map) {
  super(map.size());
  map.forEachEntry(new TObjectIntProcedure<HighlightSeverity>() {
    @Override
    public boolean execute(HighlightSeverity key, int value) {
      OrderMap.super.put(key, value);
      return true;
    }
  });
  trimToSize();
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:12,代码来源:SeverityRegistrar.java

示例4: indexString

import gnu.trove.TObjectIntHashMap; //导入方法依赖的package包/类
public static int indexString(String string, TObjectIntHashMap<String> map, ArrayList<String> list) {
	if (map.contains(string)) {
		return map.get(string);
	} else {
		int size = map.size();
		map.put(string, size);
		list.add(string);
		return size;
	}
}
 
开发者ID:Noahs-ARK,项目名称:semafor-semantic-parser,代码行数:11,代码来源:ConvertGraphToSerObj.java

示例5: toIndexedStringArray

import gnu.trove.TObjectIntHashMap; //导入方法依赖的package包/类
/**
     * Utility method for creating a String[] array from a map whose
     * keys are labels (Strings) to be stored in the array and whose
     * values are the indices (Integers) at which the corresponding
     * labels should be inserted.
     *
     * @param labelToIndexMap a <code>TObjectIntHashMap</code> value
     * @return a <code>String[]</code> value
     * @since maxent 1.2.6
     */
protected static String[] toIndexedStringArray(TObjectIntHashMap labelToIndexMap) {
    final String[] array = new String[labelToIndexMap.size()];
    labelToIndexMap.forEachEntry(new TObjectIntProcedure() {
            public boolean execute(Object str, int index) {
                array[index] = (String)str;
                return true;
            }
        });
    return array;
}
 
开发者ID:BlueBrain,项目名称:bluima,代码行数:21,代码来源:AbstractDataIndexer.java

示例6: OrderMap

import gnu.trove.TObjectIntHashMap; //导入方法依赖的package包/类
private OrderMap(@Nonnull TObjectIntHashMap<HighlightSeverity> map) {
  super(map.size());
  map.forEachEntry(new TObjectIntProcedure<HighlightSeverity>() {
    @Override
    public boolean execute(HighlightSeverity key, int value) {
      OrderMap.super.put(key, value);
      return true;
    }
  });
  trimToSize();
}
 
开发者ID:consulo,项目名称:consulo,代码行数:12,代码来源:SeverityRegistrar.java

示例7: hashCode

import gnu.trove.TObjectIntHashMap; //导入方法依赖的package包/类
/**
 * Returns a hash code using the given map from vars to ints.
 */
public int hashCode(TObjectIntHashMap varMap) {
	// see if this already in map
	if (varMap.containsKey(this))
		return varMap.get(this);
	// otherwise add it
	int next = varMap.size() + 1;
	varMap.put(this, next);
	return next;
}
 
开发者ID:OpenCCG,项目名称:openccg,代码行数:13,代码来源:VarModality.java


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