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


Java EventSet.isEmpty方法代码示例

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


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

示例1: removeInternal

import com.sun.jdi.event.EventSet; //导入方法依赖的package包/类
EventSet removeInternal() throws InterruptedException {
    EventSet eventSet;
    do {
        // Waiting forever, so removeUnfiltered() is never null
        eventSet = removeUnfiltered(0).internalFilter();
    } while (eventSet == null || eventSet.isEmpty());

    /*
     * Currently, no internal events are requested with a suspend
     * policy other than none, so we don't check for notifySuspend()
     * here. If this changes in the future, there is much
     * infrastructure that needs to be updated.
     */

    return eventSet;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:17,代码来源:EventQueueImpl.java

示例2: remove

import com.sun.jdi.event.EventSet; //导入方法依赖的package包/类
/**
 * Filter out events not for user's eyes.
 * Then filter out empty sets.
 */
public EventSet remove(long timeout) throws InterruptedException {
    if (timeout < 0) {
        throw new IllegalArgumentException("Timeout cannot be negative");
    }

    EventSet eventSet;
    while (true) {
        EventSetImpl fullEventSet = removeUnfiltered(timeout);
        if (fullEventSet == null) {
            eventSet = null;  // timeout
            break;
        }
        /*
         * Remove events from the event set for which
         * there is no corresponding enabled request (
         * this includes our internally requested events.)
         * This never returns null
         */
        eventSet = fullEventSet.userFilter();
        if (!eventSet.isEmpty()) {
            break;
        }
    }

    if ((eventSet != null) && (eventSet.suspendPolicy() == JDWP.SuspendPolicy.ALL)) {
        vm.notifySuspend();
    }

    return eventSet;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:35,代码来源:EventQueueImpl.java


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