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

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

?? relativedayofweekrule.java

?? 水晶 ? ?  報表 ? ? ? 源碼
?? JAVA
字號:
/* ===================================================
 * JCommon : a free general purpose Java class library
 * ===================================================
 *
 * Project Info:  http://www.jfree.org/jcommon/index.html
 * Project Lead:  David Gilbert (david.gilbert@object-refinery.com);
 *
 * (C) Copyright 2000-2003, by Object Refinery Limited and Contributors.
 *
 * This library is free software; you can redistribute it and/or modify it under the terms
 * of the GNU Lesser General Public License as published by the Free Software Foundation;
 * either version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
 * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 * See the GNU Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License along with this
 * library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
 * Boston, MA 02111-1307, USA.
 *
 * --------------------------
 * RelativeDayOfWeekRule.java
 * --------------------------
 * (C) Copyright 2000-2003, by Object Refinery Limited and Contributors.
 *
 * Original Author:  David Gilbert (for Object Refinery Limited);
 * Contributor(s):   -;
 *
 * $Id: RelativeDayOfWeekRule.java,v 1.2 2003/06/05 08:07:07 mungady Exp $
 *
 * Changes (from 26-Oct-2001)
 * --------------------------
 * 26-Oct-2001 : Changed package to com.jrefinery.date.*;
 * 03-Oct-2002 : Fixed errors reported by Checkstyle (DG);
 *
 */

package org.jfree.date;

/**
 * An annual date rule that returns a date for each year based on (a) a
 * reference rule; (b) a day of the week; and (c) a selection parameter
 * (SerialDate.PRECEDING, SerialDate.NEAREST, SerialDate.FOLLOWING).
 * <P>
 * For example, Good Friday can be specified as 'the Friday PRECEDING Easter Sunday'.
 *
 * @author David Gilbert
 */
public class RelativeDayOfWeekRule extends AnnualDateRule implements Cloneable {

    /** A reference to the annual date rule on which this rule is based. */
    private AnnualDateRule subrule;

    /** The day of the week (SerialDate.MONDAY, SerialDate.TUESDAY, and so on). */
    private int dayOfWeek;

    /** Specifies which day of the week (PRECEDING, NEAREST or FOLLOWING). */
    private int relative;

    /**
     * Default constructor - builds a rule for the Monday following 1 January.
     */
    public RelativeDayOfWeekRule() {
        this(new DayAndMonthRule(), SerialDate.MONDAY, SerialDate.FOLLOWING);
    }

    /**
     * Standard constructor - builds rule based on the supplied sub-rule.
     *
     * @param subrule  the rule that determines the reference date.
     * @param dayOfWeek  the day-of-the-week relative to the reference date.
     * @param relative  indicates *which* day-of-the-week (preceding, nearest or following).
     */
    public RelativeDayOfWeekRule(AnnualDateRule subrule, int dayOfWeek, int relative) {
        this.subrule = subrule;
        this.dayOfWeek = dayOfWeek;
        this.relative = relative;
    }

    /**
     * Returns the sub-rule (also called the reference rule).
     *
     * @return the annual date rule that determines the reference date for this rule.
     */
    public AnnualDateRule getSubrule() {
        return subrule;
    }

    /**
     * Sets the sub-rule.
     *
     * @param subrule  the annual date rule that determines the reference date for this rule.
     */
    public void setSubrule(AnnualDateRule subrule) {
        this.subrule = subrule;
    }

    /**
     * Returns the day-of-the-week for this rule.
     *
     * @return the day-of-the-week for this rule.
     */
    public int getDayOfWeek() {
        return dayOfWeek;
    }

    /**
     * Sets the day-of-the-week for this rule.
     *
     * @param dayOfWeek  the day-of-the-week (SerialDate.MONDAY, SerialDate.TUESDAY, and so on).
     */
    public void setDayOfWeek(int dayOfWeek) {
        this.dayOfWeek = dayOfWeek;
    }

    /**
     * Returns the 'relative' attribute, that determines *which* day-of-the-week we are
     * interested in (SerialDate.PRECEDING, SerialDate.NEAREST or SerialDate.FOLLOWING).
     *
     * @return the 'relative' attribute.
     */
    public int getRelative() {
        return relative;
    }

    /**
     * Sets the 'relative' attribute (SerialDate.PRECEDING, SerialDate.NEAREST,
     * SerialDate.FOLLOWING).
     *
     * @param relative  determines *which* day-of-the-week is selected by this rule.
     */
    public void setRelative(int relative) {
        this.relative = relative;
    }

    /**
     * Creates a clone of this rule.
     *
     * @return a clone of this rule.
     *
     * @throws CloneNotSupportedException this should never happen.
     */
    public Object clone() throws CloneNotSupportedException {
        RelativeDayOfWeekRule duplicate = null;
        duplicate = (RelativeDayOfWeekRule) super.clone();
        duplicate.subrule = (AnnualDateRule) duplicate.getSubrule().clone();
        return duplicate;
    }

    /**
     * Returns the date generated by this rule, for the specified year.
     *
     * @param year  the year (1900 &lt;= year &lt;= 9999).
     *
     * @return the date generated by the rule for the given year (null possible).
     */
    public SerialDate getDate(int year) {

        // check argument...
        if ((year < SerialDate.MINIMUM_YEAR_SUPPORTED)
            || (year > SerialDate.MAXIMUM_YEAR_SUPPORTED)) {
            throw new IllegalArgumentException(
                "RelativeDayOfWeekRule.getDate(...): year outside valid range.");
        }

        // calculate the date...
        SerialDate result = null;
        SerialDate base = subrule.getDate(year);

        if (base != null) {

            switch (relative) {

                case(SerialDate.PRECEDING):
                    result = SerialDate.getPreviousDayOfWeek(dayOfWeek, base);
                    break;

                case(SerialDate.NEAREST):
                    result = SerialDate.getNearestDayOfWeek(dayOfWeek, base);
                    break;

                case(SerialDate.FOLLOWING):
                    result = SerialDate.getFollowingDayOfWeek(dayOfWeek, base);
                    break;

                default:
                    break;

            }

        }

        return result;

    }

}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
天天色天天操综合| 99久久er热在这里只有精品15| 亚洲国产高清不卡| 国产精品一二三| 久久影院午夜片一区| 国产精品久久久久影视| 亚洲欧美日韩国产另类专区| 日韩国产一区二| 精品视频一区三区九区| 亚洲动漫第一页| 日韩欧美一二三区| 国产传媒一区在线| 国产精品麻豆一区二区| 一本到三区不卡视频| 亚洲一区二区精品视频| 91精品国产综合久久蜜臀| 奇米一区二区三区| 久久久久国产一区二区三区四区| 成人免费观看av| 一级日本不卡的影视| 欧美日韩精品电影| 国产精品综合av一区二区国产馆| 亚洲色图欧洲色图婷婷| 欧美日韩你懂的| 激情小说亚洲一区| 亚洲女女做受ⅹxx高潮| 欧美一级片免费看| 成人av资源在线观看| 亚洲成人免费影院| 久久精品男人的天堂| 色屁屁一区二区| 裸体歌舞表演一区二区| 亚洲日本一区二区| 日韩亚洲电影在线| 91丝袜呻吟高潮美腿白嫩在线观看| 亚洲国产精品麻豆| 欧美激情一区二区在线| 欧美丰满少妇xxxbbb| 成人免费视频视频在线观看免费| 亚洲aⅴ怡春院| 国产日产精品一区| 91麻豆精品国产综合久久久久久| 国产69精品一区二区亚洲孕妇| 亚洲午夜视频在线观看| 久久综合九色综合97婷婷 | 久久综合精品国产一区二区三区 | 国产精品天干天干在观线| 51精品视频一区二区三区| 成人小视频在线| 日韩精品欧美成人高清一区二区| 国产精品久久国产精麻豆99网站| 日韩午夜精品视频| 欧洲另类一二三四区| 国产91精品露脸国语对白| 久久se这里有精品| 天天色图综合网| 亚洲人成精品久久久久| 国产欧美日韩激情| 精品国精品国产| 337p亚洲精品色噜噜噜| 一本色道久久综合亚洲aⅴ蜜桃 | 夜夜嗨av一区二区三区中文字幕 | 日韩va亚洲va欧美va久久| 亚洲三级久久久| 欧美国产1区2区| 欧美大胆一级视频| 91精品国产手机| 欧美日韩国产小视频| 欧美中文字幕不卡| 欧洲av在线精品| 色噜噜久久综合| 色狠狠桃花综合| 91小视频在线| 色综合天天综合狠狠| 99精品视频一区| 99国产精品国产精品久久| 国产精品888| 风间由美一区二区三区在线观看| 国产乱码精品一区二区三区av| 激情五月婷婷综合网| 国产福利不卡视频| 成人一道本在线| 一本色道久久综合精品竹菊| 91色乱码一区二区三区| 欧美午夜寂寞影院| 欧美精品 日韩| 日韩欧美另类在线| 久久色.com| 国产清纯白嫩初高生在线观看91 | 日本免费新一区视频| 日韩欧美亚洲一区二区| 日韩亚洲欧美在线观看| 日韩一区二区三免费高清| 欧美日韩国产综合久久| 欧美日本一区二区三区四区 | 夜夜嗨av一区二区三区四季av| 日韩毛片视频在线看| 国产精品久久影院| 国产精品短视频| 综合久久综合久久| 亚洲人成网站色在线观看| 亚洲免费看黄网站| 一区二区三区四区精品在线视频| 亚洲欧美日韩精品久久久久| 亚洲欧美一区二区三区孕妇| 亚洲午夜久久久久久久久电影院| 一区二区免费在线| 日韩经典一区二区| 婷婷综合久久一区二区三区| 亚洲自拍欧美精品| 青青草原综合久久大伊人精品 | 日本高清视频一区二区| 欧美性videosxxxxx| 在线不卡一区二区| 精品国产乱码久久| 亚洲国产精品ⅴa在线观看| 综合久久一区二区三区| 亚洲成人福利片| 蜜桃精品视频在线观看| 国产91在线|亚洲| 日本久久精品电影| 欧美一级一级性生活免费录像| 国产亚洲短视频| 午夜a成v人精品| 国产盗摄女厕一区二区三区| 色诱视频网站一区| 欧美一区二区三区小说| 久久精品水蜜桃av综合天堂| 国产精品污污网站在线观看| 日本vs亚洲vs韩国一区三区| 高清beeg欧美| 欧美三级三级三级爽爽爽| 久久婷婷国产综合国色天香| 一区二区三区四区亚洲| 久久成人av少妇免费| 成人av网站免费观看| 欧美大片顶级少妇| 一区二区三区成人在线视频| 国产呦萝稀缺另类资源| 欧美系列在线观看| 国产日韩高清在线| 一区二区三区免费看视频| 国产精品77777竹菊影视小说| 欧美日韩中文字幕精品| 国产视频一区在线播放| 日韩国产高清在线| 国产精品影视在线观看| 欧美美女视频在线观看| 国产精品久久久一本精品| 日韩高清欧美激情| 色999日韩国产欧美一区二区| 国产亚洲一本大道中文在线| 婷婷丁香久久五月婷婷| 国产一区在线观看视频| 欧美日韩精品三区| 亚洲天堂网中文字| 午夜亚洲国产au精品一区二区| 成人av先锋影音| 久久久九九九九| 麻豆精品久久精品色综合| 在线欧美日韩精品| 一区二区理论电影在线观看| 成人高清视频免费观看| 欧美大片一区二区三区| 舔着乳尖日韩一区| 欧美在线免费观看亚洲| 亚洲蜜臀av乱码久久精品蜜桃| 国产高清不卡一区| 日韩精品在线一区二区| 午夜激情综合网| 91福利视频在线| 久久精品网站免费观看| 懂色av一区二区三区免费观看| 日韩一区二区在线免费观看| 香蕉加勒比综合久久| 在线视频中文字幕一区二区| 国产精品伦理在线| 99精品在线免费| 亚洲免费成人av| 91麻豆国产精品久久| 日韩理论电影院| 日本久久一区二区| 天天综合网 天天综合色| 欧美视频一二三区| 丝袜美腿亚洲综合| 欧美高清你懂得| 一区二区三区欧美久久| 91精品国产综合久久福利| 日韩av不卡在线观看| 日韩欧美电影一区| 国产综合色在线视频区| 精品国产青草久久久久福利| 国产99久久久国产精品潘金| 国产精品麻豆久久久| 91麻豆123| 一个色在线综合| 国产成人av一区二区三区在线| 亚洲特黄一级片| 欧美影院一区二区三区| 日韩av一区二区在线影视|