亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? dbqueryiterator.java

?? 這是學習Java必須讀懂兩套源代碼
?? JAVA
字號:
/**
 * Copyright (C) 2001 Yasna.com. All rights reserved.
 *
 * ===================================================================
 * The Apache Software License, Version 1.1
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 *
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 *
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in
 *    the documentation and/or other materials provided with the
 *    distribution.
 *
 * 3. The end-user documentation included with the redistribution,
 *    if any, must include the following acknowledgment:
 *       "This product includes software developed by
 *        Yasna.com (http://www.yasna.com)."
 *    Alternately, this acknowledgment may appear in the software itself,
 *    if and wherever such third-party acknowledgments normally appear.
 *
 * 4. The names "Yazd" and "Yasna.com" must not be used to
 *    endorse or promote products derived from this software without
 *    prior written permission. For written permission, please
 *    contact yazd@yasna.com.
 *
 * 5. Products derived from this software may not be called "Yazd",
 *    nor may "Yazd" appear in their name, without prior written
 *    permission of Yasna.com.
 *
 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
 * DISCLAIMED.  IN NO EVENT SHALL YASNA.COM OR
 * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
 * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 * SUCH DAMAGE.
 * ====================================================================
 *
 * This software consists of voluntary contributions made by many
 * individuals on behalf of Yasna.com. For more information
 * on Yasna.com, please see <http://www.yasna.com>.
 */

/**
 * Copyright (C) 2000 CoolServlets.com. All rights reserved.
 *
 * ===================================================================
 * The Apache Software License, Version 1.1
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 *
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 *
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in
 *    the documentation and/or other materials provided with the
 *    distribution.
 *
 * 3. The end-user documentation included with the redistribution,
 *    if any, must include the following acknowledgment:
 *       "This product includes software developed by
 *        CoolServlets.com (http://www.coolservlets.com)."
 *    Alternately, this acknowledgment may appear in the software itself,
 *    if and wherever such third-party acknowledgments normally appear.
 *
 * 4. The names "Jive" and "CoolServlets.com" must not be used to
 *    endorse or promote products derived from this software without
 *    prior written permission. For written permission, please
 *    contact webmaster@coolservlets.com.
 *
 * 5. Products derived from this software may not be called "Jive",
 *    nor may "Jive" appear in their name, without prior written
 *    permission of CoolServlets.com.
 *
 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
 * DISCLAIMED.  IN NO EVENT SHALL COOLSERVLETS.COM OR
 * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
 * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 * SUCH DAMAGE.
 * ====================================================================
 *
 * This software consists of voluntary contributions made by many
 * individuals on behalf of CoolServlets.com. For more information
 * on CoolServlets.com, please see <http://www.coolservlets.com>.
 */

package com.Yasna.forum.database;

import java.util.*;

import com.Yasna.util.*;
import com.Yasna.forum.*;

/**
 * Iterator for database query results.
 */
public class DbQueryIterator implements Iterator {

    //maintain an array of message ids to iterator through.
    private int [] messages;
    //points to the current message id that the user has iterated to.
    private int currentIndex = -1;

    private int maxIndex;

    private DbForumFactory factory;

    /**
     * Creates a new query iterator using an array of message id's. The
     * ForumFactory is used to lookup the actual message objects.
     *
     * @param messages the array of message id's to iterate through.
     * @param factory a DbForumFactory to obtain actual message objects from.
     */
    public DbQueryIterator(int [] messages, DbForumFactory factory) {
        this.messages = messages;
        this.factory = factory;
        maxIndex = messages.length;
    }

    /**
     * Creates a new query iterator using an array of message id's. The
     * ForumFactory is used to lookup the actual message objects. A start index
     * and number of results limit the scope of the Iterator to a subset of the
     * message array. However, if the start index or number of results does
     * not fall into the bounds of the message array, the Iterator may return
     * fewer results than the number indicated by the numResults paramater.
     *
     * @param messages the array of message id's to iterate through.
     * @param factory a DbForumFactory to obtain actual message objects from.
     * @param startIndex a starting index in the messages array for the Iterator.
     * @param numResults the max number of results the Iterator should provide.
     */
    public DbQueryIterator(int [] messages, DbForumFactory factory,
            int startIndex, int numResults)
    {
        this.messages = messages;
        this.factory = factory;
        currentIndex = startIndex-1;
        maxIndex = startIndex + numResults;
    }

    /**
     * Returns true if there are more messages left to iteratate through.
     */
    public boolean hasNext() {
        return (currentIndex+1 < messages.length && currentIndex+1 < maxIndex);
    }

    /**
     * Returns the next message.
     */
    public Object next() throws java.util.NoSuchElementException {
        ForumMessage message = null;
        currentIndex++;
        if (currentIndex >= messages.length) {
            throw new java.util.NoSuchElementException();
        }
        try {
            int messageID = messages[currentIndex];
            message = factory.getMessage(messageID);
            //Now, get the message from the it's thread so that filters are
            //applied to the message. This may seem a bit convuluted, but is
            //necessary.
            message = message.getForumThread().getMessage(messageID);
        }
        catch (Exception e) {
            e.printStackTrace();
        }
        return message;
    }

    /**
     * For security reasons, the remove operation is not supported.
     */
    public void remove() {
        throw new UnsupportedOperationException();
    }
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
图片区日韩欧美亚洲| 国产精品久久毛片| 欧美性videosxxxxx| 国产98色在线|日韩| 五月天激情小说综合| 国产精品久久久久精k8| 日韩视频免费直播| 3atv一区二区三区| 一本到不卡精品视频在线观看| 精品一区二区三区日韩| 亚洲福利一区二区三区| 亚洲色图清纯唯美| 国产精品欧美一区二区三区| wwww国产精品欧美| 日韩欧美不卡在线观看视频| 欧美电影在线免费观看| 在线视频你懂得一区| 亚洲成人7777| 一区二区三区久久久| 亚洲免费av网站| 亚洲日本丝袜连裤袜办公室| 国产女主播视频一区二区| 精品对白一区国产伦| www国产精品av| 国产精品无人区| 亚洲免费观看在线视频| 一区二区三区在线视频免费 | 欧美专区亚洲专区| 99国产一区二区三精品乱码| a级精品国产片在线观看| 91在线观看地址| 91精品国产一区二区| 精品少妇一区二区三区日产乱码 | 欧美精品一级二级| 26uuu精品一区二区在线观看| 久久综合色天天久久综合图片| 久久精品人人做人人综合| 国产精品灌醉下药二区| 日韩主播视频在线| 国产一区二区三区电影在线观看| 国产成人精品在线看| 在线观看日韩精品| 国产亚洲va综合人人澡精品| 最新国产精品久久精品| 日韩国产在线观看一区| 国产成a人亚洲精| 欧美日韩成人在线一区| 亚洲国产精品精华液ab| 午夜av区久久| 91在线丨porny丨国产| 精品国产乱码久久久久久图片 | 经典三级视频一区| 日本韩国欧美国产| 国产日韩欧美综合在线| 免费欧美在线视频| 欧美另类变人与禽xxxxx| 日本一区二区三区久久久久久久久不| 亚洲一区免费观看| 99久久er热在这里只有精品66| 精品国产免费人成电影在线观看四季 | 成a人片国产精品| 精品理论电影在线观看| 激情小说欧美图片| 欧美三级一区二区| 一区2区3区在线看| 色成年激情久久综合| 中文字幕亚洲成人| 色综合咪咪久久| 亚洲精品国产精华液| 99久久精品免费看| 夜夜亚洲天天久久| 欧美精品自拍偷拍| 日本亚洲免费观看| 精品国产91久久久久久久妲己| 免费观看久久久4p| 欧美大片免费久久精品三p | 免费人成网站在线观看欧美高清| 欧美久久一二区| 蜜桃视频一区二区三区在线观看| 欧美日韩国产精品自在自线| 午夜在线成人av| 日韩精品专区在线影院重磅| 久久成人免费网| 国产欧美日韩综合| 欧美视频一区在线观看| 美女脱光内衣内裤视频久久网站 | 精品无人区卡一卡二卡三乱码免费卡| 欧美xxx久久| 在线视频观看一区| 久久精品国产99国产精品| 国产欧美一区二区精品秋霞影院| 97久久精品人人做人人爽| 亚洲五码中文字幕| 久久午夜电影网| 欧美日韩精品一区二区三区 | 精品国产乱码久久久久久久| 国产成人午夜精品影院观看视频 | 亚洲精品成人悠悠色影视| 欧美肥大bbwbbw高潮| 99久久国产综合精品麻豆| 日本美女一区二区三区| 中文字幕一区三区| 日韩一区二区视频在线观看| 一本久道中文字幕精品亚洲嫩| 久热成人在线视频| 亚洲一区二区中文在线| 欧美激情一区不卡| 精品日韩一区二区三区| 99视频国产精品| 国产麻豆午夜三级精品| 日韩—二三区免费观看av| 亚洲综合色成人| 亚洲婷婷在线视频| 国产精品少妇自拍| 久久久国产精华| 久久影音资源网| 精品久久久网站| 精品少妇一区二区三区免费观看| 91精品视频网| 欧美日韩精品欧美日韩精品一综合| 国产91综合一区在线观看| 精品一区二区三区在线播放| 毛片av一区二区三区| 青青草成人在线观看| 久久av老司机精品网站导航| 日韩精品一二三四| 国产在线视视频有精品| 韩国精品久久久| 成人综合在线观看| 国产91丝袜在线18| 91极品美女在线| 4438x亚洲最大成人网| 日韩一区二区免费视频| 国产日韩精品一区二区浪潮av| 国产视频一区二区在线观看| 国产精品久久99| 日韩精品亚洲专区| 国产98色在线|日韩| 色婷婷香蕉在线一区二区| 91福利在线导航| 欧美zozozo| 一区二区三区四区乱视频| 日日夜夜精品视频免费| 国产福利91精品一区二区三区| 色婷婷久久一区二区三区麻豆| 色综合久久天天综合网| 日韩欧美一级片| 亚洲精品中文在线| 国产美女av一区二区三区| 91视频你懂的| 国产亚洲精品aa| 石原莉奈一区二区三区在线观看| 国产在线观看免费一区| 欧美色欧美亚洲另类二区| 久久久久免费观看| 日本不卡中文字幕| 色哟哟亚洲精品| 国产精品美女久久久久久2018 | 天堂资源在线中文精品| 成人99免费视频| 国产亚洲欧洲997久久综合| 天天做天天摸天天爽国产一区 | 欧美在线免费观看亚洲| 欧美国产日韩精品免费观看| 免费观看一级欧美片| 欧美区一区二区三区| 一区二区激情视频| 91在线无精精品入口| 亚洲视频免费在线| 99re在线精品| 亚洲女同女同女同女同女同69| 粉嫩aⅴ一区二区三区四区| 久久久久久久久99精品| 精品一区二区成人精品| 精品嫩草影院久久| 加勒比av一区二区| 国产欧美日韩在线| 成人av网址在线| 亚洲欧美日韩中文播放| 色综合视频在线观看| 亚洲一区二区三区视频在线| 欧美日韩卡一卡二| 毛片av中文字幕一区二区| 久久婷婷一区二区三区| 国产一区二区女| 中文字幕制服丝袜成人av| 色综合久久综合网97色综合 | 成人99免费视频| 亚洲h动漫在线| 精品国产sm最大网站| 懂色中文一区二区在线播放| 18成人在线观看| 在线电影国产精品| 成人av在线资源网站| 亚洲午夜在线电影| 欧美韩日一区二区三区| 欧美日本乱大交xxxxx| 国产麻豆成人传媒免费观看| 亚洲久草在线视频| 久久精品一级爱片|