本文整理汇总了Java中gnu.trove.TObjectIntIterator.value方法的典型用法代码示例。如果您正苦于以下问题:Java TObjectIntIterator.value方法的具体用法?Java TObjectIntIterator.value怎么用?Java TObjectIntIterator.value使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类gnu.trove.TObjectIntIterator
的用法示例。
在下文中一共展示了TObjectIntIterator.value方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: removeFeatures
import gnu.trove.TObjectIntIterator; //导入方法依赖的package包/类
public void removeFeatures(IIntIterator removedFeatures) {
int shift = 0;
int lastGoodFeature = 0;
int totalFeatures = _featuresMap.size();
TIntIntHashMap featuresRemap = new TIntIntHashMap();
while (removedFeatures.hasNext()) {
int removedFeature = removedFeatures.next();
while (lastGoodFeature < removedFeature) {
featuresRemap.put(lastGoodFeature, lastGoodFeature - shift);
++lastGoodFeature;
}
lastGoodFeature = removedFeature + 1;
int removedFeaturePosition = removedFeature - shift;
_featuresMap.remove(_featuresRMap.get(removedFeaturePosition));
_featuresRMap.remove(removedFeaturePosition);
++shift;
}
while (lastGoodFeature < totalFeatures) {
featuresRemap.put(lastGoodFeature, lastGoodFeature - shift);
++lastGoodFeature;
}
TObjectIntIterator<String> mapIter = _featuresMap.iterator();
while (mapIter.hasNext()) {
mapIter.advance();
int value = mapIter.value();
int newvalue = featuresRemap.get(value);
mapIter.setValue(newvalue);
}
}
示例2: buildFlags
import gnu.trove.TObjectIntIterator; //导入方法依赖的package包/类
public static int buildFlags(GrModifierList modifierList) {
int flags = 0;
final TObjectIntIterator<String> iterator = GrModifierListImpl.NAME_TO_MODIFIER_FLAG_MAP.iterator();
while (iterator.hasNext()) {
iterator.advance();
if (modifierList.hasExplicitModifier(iterator.key())) {
flags |= iterator.value();
}
}
return flags;
}