本文整理汇总了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();
}
示例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();
}
示例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();
}
示例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;
}
}
示例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;
}
示例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();
}
示例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;
}