本文整理汇总了Java中gnu.trove.TIntIntProcedure类的典型用法代码示例。如果您正苦于以下问题:Java TIntIntProcedure类的具体用法?Java TIntIntProcedure怎么用?Java TIntIntProcedure使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
TIntIntProcedure类属于gnu.trove包,在下文中一共展示了TIntIntProcedure类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getResult
import gnu.trove.TIntIntProcedure; //导入依赖的package包/类
public Map<IdIndexEntry, Integer> getResult() {
final Map<IdIndexEntry, Integer> result = new THashMap<IdIndexEntry, Integer>(myResult.size());
myResult.forEachEntry(new TIntIntProcedure() {
@Override
public boolean execute(final int key, final int value) {
result.put(new IdIndexEntry(key), value);
return true;
}
});
return result;
}
示例2: getCurrentModalityCount
import gnu.trove.TIntIntProcedure; //导入依赖的package包/类
private int getCurrentModalityCount() {
int modalityCount = 0;
Window[] windows = Window.getWindows();
for (Window each : windows) {
if (!each.isShowing()) continue;
if (each instanceof Dialog) {
Dialog eachDialog = (Dialog)each;
if (eachDialog.isModal()) {
modalityCount++;
}
else if (each instanceof JDialog) {
if (isModalContextPopup(((JDialog)each).getRootPane())) {
modalityCount++;
}
}
}
else if (each instanceof JWindow) {
JRootPane rootPane = ((JWindow)each).getRootPane();
if (isModalContextPopup(rootPane)) {
modalityCount++;
}
}
}
final int finalModalityCount = modalityCount;
myModalityCount2FlushCount.retainEntries(new TIntIntProcedure() {
@Override
public boolean execute(int eachModalityCount, int flushCount) {
return eachModalityCount <= finalModalityCount;
}
});
return modalityCount;
}
示例3: hasOtherModifiers
import gnu.trove.TIntIntProcedure; //导入依赖的package包/类
private boolean hasOtherModifiers(KeyEvent keyEvent) {
final int modifiers = keyEvent.getModifiers();
return !KEY_CODE_TO_MODIFIER_MAP.forEachEntry(new TIntIntProcedure() {
@Override
public boolean execute(int keyCode, int modifierMask) {
return keyCode == myModifierKeyCode || (modifiers & modifierMask) == 0;
}
});
}
示例4: putAll
import gnu.trove.TIntIntProcedure; //导入依赖的package包/类
@Override
public void putAll(final IntIntMaplet m) {
m.forEachEntry(new TIntIntProcedure() {
@Override
public boolean execute(int key, int value) {
myMap.put(key, value);
return true;
}
});
}
示例5: putAll
import gnu.trove.TIntIntProcedure; //导入依赖的package包/类
@Override
public void putAll(final IntIntMaplet m) {
m.forEachEntry(new TIntIntProcedure() {
@Override
public boolean execute(int key, int value) {
put(key, value);
return true;
}
});
}
示例6: forEachEntry
import gnu.trove.TIntIntProcedure; //导入依赖的package包/类
@Override
public void forEachEntry(TIntIntProcedure proc) {
myMap.forEachEntry(proc);
}
示例7: forEachEntry
import gnu.trove.TIntIntProcedure; //导入依赖的package包/类
abstract void forEachEntry(TIntIntProcedure proc);