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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? week.java

?? jfreechart1.0.1 jsp繪制圖表的開發(fā)包
?? JAVA
?? 第 1 頁 / 共 2 頁
字號:
/* ===========================================================
 * JFreeChart : a free chart library for the Java(tm) platform
 * ===========================================================
 *
 * (C) Copyright 2000-2005, by Object Refinery Limited and Contributors.
 *
 * Project Info:  http://www.jfree.org/jfreechart/index.html
 *
 * 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, 
 * USA.  
 *
 * [Java is a trademark or registered trademark of Sun Microsystems, Inc. 
 * in the United States and other countries.]
 *
 * ---------
 * Week.java
 * ---------
 * (C) Copyright 2001-2004, by Object Refinery Limited and Contributors.
 *
 * Original Author:  David Gilbert (for Object Refinery Limited);
 * Contributor(s):   Aimin Han;
 *
 * $Id: Week.java,v 1.7.2.1 2005/10/25 21:35:24 mungady Exp $
 *
 * Changes
 * -------
 * 11-Oct-2001 : Version 1 (DG);
 * 18-Dec-2001 : Changed order of parameters in constructor (DG);
 * 19-Dec-2001 : Added a new constructor as suggested by Paul English (DG);
 * 29-Jan-2002 : Worked on the parseWeek() method (DG);
 * 13-Feb-2002 : Fixed bug in Week(Date) constructor (DG);
 * 26-Feb-2002 : Changed getStart(), getMiddle() and getEnd() methods to 
 *               evaluate with reference to a particular time zone (DG);
 * 05-Apr-2002 : Reinstated this class to the JCommon library (DG);
 * 24-Jun-2002 : Removed unnecessary main method (DG);
 * 10-Sep-2002 : Added getSerialIndex() method (DG);
 * 06-Oct-2002 : Fixed errors reported by Checkstyle (DG);
 * 18-Oct-2002 : Changed to observe 52 or 53 weeks per year, consistent with 
 *               GregorianCalendar. Thanks to Aimin Han for the code (DG);
 * 02-Jan-2003 : Removed debug code (DG);
 * 13-Mar-2003 : Moved to com.jrefinery.data.time package, and implemented 
 *               Serializable (DG);
 * 21-Oct-2003 : Added hashCode() method (DG);
 * 24-May-2004 : Modified getFirstMillisecond() and getLastMillisecond() to 
 *               take account of firstDayOfWeek setting in Java's Calendar 
 *               class (DG);
 * 30-Sep-2004 : Replaced getTime().getTime() with getTimeInMillis() (DG);
 * 04-Nov-2004 : Reverted change of 30-Sep-2004, because it won't work for 
 *               JDK 1.3 (DG);
 *
 */

package org.jfree.data.time;

import java.io.Serializable;
import java.util.Calendar;
import java.util.Date;
import java.util.TimeZone;

/**
 * A calendar week.  All years are considered to have 53 weeks, numbered from 1 
 * to 53, although in many cases the 53rd week is empty.  Most of the time, the
 * 1st week of the year *begins* in the previous calendar year, but it always 
 * finishes in the current year (this behaviour matches the workings of the 
 * <code>GregorianCalendar</code> class).
 * <P>
 * This class is immutable, which is a requirement for all 
 * {@link RegularTimePeriod} subclasses.
 */
public class Week extends RegularTimePeriod implements Serializable {

    /** For serialization. */
    private static final long serialVersionUID = 1856387786939865061L;
    
    /** Constant for the first week in the year. */
    public static final int FIRST_WEEK_IN_YEAR = 1;

    /** Constant for the last week in the year. */
    public static final int LAST_WEEK_IN_YEAR = 53;

    /** The year in which the week falls. */
    private Year year;

    /** The week (1-53). */
    private int week;

    /**
     * Creates a new time period for the week in which the current system 
     * date/time falls.
     */
    public Week() {
        this(new Date());
    }

    /**
     * Creates a time period representing the week in the specified year.
     *
     * @param week  the week (1 to 53).
     * @param year  the year (1900 to 9999).
     */
    public Week(int week, int year) {
        this(week, new Year(year));
    }

    /**
     * Creates a time period representing the week in the specified year.
     *
     * @param week  the week (1 to 53).
     * @param year  the year (1900 to 9999).
     */
    public Week(int week, Year year) {
        if ((week < FIRST_WEEK_IN_YEAR) && (week > LAST_WEEK_IN_YEAR)) {
            throw new IllegalArgumentException(
                "The 'week' argument must be in the range 1 - 53."
            );
        }
        this.week = week;
        this.year = year;
    }

    /**
     * Creates a time period for the week in which the specified date/time 
     * falls.
     *
     * @param time  the time (<code>null</code> not permitted).
     */
    public Week(Date time) {
        // defer argument checking...
        this(time, RegularTimePeriod.DEFAULT_TIME_ZONE);
    }

    /**
     * Creates a time period for the week in which the specified date/time 
     * falls, calculated relative to the specified time zone.
     *
     * @param time  the date/time (<code>null</code> not permitted).
     * @param zone  the time zone (<code>null</code> not permitted).
     */
    public Week(Date time, TimeZone zone) {
        if (time == null) {
            throw new IllegalArgumentException("Null 'time' argument.");   
        }
        if (zone == null) {
            throw new IllegalArgumentException("Null 'zone' argument.");   
        }
        Calendar calendar = Calendar.getInstance(zone);
        calendar.setTime(time);

        // sometimes the last few days of the year are considered to fall in 
        // the *first* week of the following year.  Refer to the Javadocs for 
        // GregorianCalendar.
        int tempWeek = calendar.get(Calendar.WEEK_OF_YEAR);
        if (tempWeek == 1 
                && calendar.get(Calendar.MONTH) == Calendar.DECEMBER) {
            this.week = 1;
            this.year =  new Year(calendar.get(Calendar.YEAR) + 1);
        }
        else {
            this.week = Math.min(tempWeek, LAST_WEEK_IN_YEAR);
            this.year = new Year(calendar.get(Calendar.YEAR));
        }

    }

    /**
     * Returns the year in which the week falls.
     *
     * @return The year (never <code>null</code>).
     */
    public Year getYear() {
        return this.year;
    }

    /**
     * Returns the year in which the week falls, as an integer value.
     *
     * @return The year.
     */
    public int getYearValue() {
        return this.year.getYear();
    }

    /**
     * Returns the week.
     *
     * @return The week.
     */
    public int getWeek() {
        return this.week;
    }

    /**
     * Returns the week preceding this one.  This method will return 
     * <code>null</code> for some lower limit on the range of weeks (currently 
     * week 1, 1900).  For week 1 of any year, the previous week is always week 
     * 53, but week 53 may not contain any days (you should check for this).
     *
     * @return The preceding week (possibly <code>null</code>).
     */
    public RegularTimePeriod previous() {

        Week result;
        if (this.week != FIRST_WEEK_IN_YEAR) {
            result = new Week(this.week - 1, this.year);
        }
        else {
            // we need to work out if the previous year has 52 or 53 weeks...
            Year prevYear = (Year) this.year.previous();
            if (prevYear != null) {
                int yy = prevYear.getYear();
                Calendar prevYearCalendar = Calendar.getInstance();
                prevYearCalendar.set(yy, Calendar.DECEMBER, 31);
                result = new Week(
                    prevYearCalendar.getActualMaximum(Calendar.WEEK_OF_YEAR), 
                    prevYear
                );
            }
            else {
                result = null;
            }
        }
        return result;

    }

    /**
     * Returns the week following this one.  This method will return 
     * <code>null</code> for some upper limit on the range of weeks (currently 
     * week 53, 9999).  For week 52 of any year, the following week is always 
     * week 53, but week 53 may not contain any days (you should check for 
     * this).
     *
     * @return The following week (possibly <code>null</code>).
     */
    public RegularTimePeriod next() {

        Week result;
        if (this.week < 52) {
            result = new Week(this.week + 1, this.year);
        }
        else {
            Calendar calendar = Calendar.getInstance();
            calendar.set(this.year.getYear(), Calendar.DECEMBER, 31);
            int actualMaxWeek 
                = calendar.getActualMaximum(Calendar.WEEK_OF_YEAR);
            if (this.week != actualMaxWeek) {
                result = new Week(this.week + 1, this.year);
            }
            else {
                Year nextYear = (Year) this.year.next();
                if (nextYear != null) {
                    result = new Week(FIRST_WEEK_IN_YEAR, nextYear);
                }
                else {
                    result = null;
                }
            }
        }
        return result;

    }

    /**
     * Returns a serial index number for the week.

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91精品国产一区二区三区香蕉| jlzzjlzz亚洲日本少妇| 日韩一区二区影院| 久久99国产精品免费| 国产亚洲视频系列| 9l国产精品久久久久麻豆| 一区二区三区在线视频免费观看| 欧洲精品一区二区三区在线观看| 日韩av电影天堂| 久久综合色之久久综合| 不卡av免费在线观看| 亚洲精品国产品国语在线app| 欧美日韩一区国产| 美女www一区二区| 国产欧美一区二区三区在线看蜜臀| 91一区二区在线| 污片在线观看一区二区| 精品粉嫩超白一线天av| av亚洲精华国产精华| 午夜精品福利久久久| 久久嫩草精品久久久久| 色婷婷一区二区三区四区| 免费在线观看日韩欧美| 国产精品久久久久久久久免费樱桃| 欧美日韩国产综合一区二区三区| 国内欧美视频一区二区| 亚洲精品免费在线播放| 精品三级在线看| 91麻豆成人久久精品二区三区| 日日夜夜精品视频免费| 国产精品国产自产拍在线| 欧美精品成人一区二区三区四区| 国产成人午夜高潮毛片| 亚洲成人久久影院| 国产精品久久久久久久久搜平片 | 91麻豆国产精品久久| 蜜臀国产一区二区三区在线播放 | 亚洲精品伦理在线| 欧美成人一区二区三区在线观看 | 成人av网站在线观看免费| 亚洲精品日产精品乱码不卡| 久久久久久久久久久99999| 欧美视频中文一区二区三区在线观看| 国产一二三精品| 香蕉久久夜色精品国产使用方法| 国产精品色眯眯| 精品福利视频一区二区三区| 欧美人与z0zoxxxx视频| 91蝌蚪porny| 成人午夜av影视| 国产综合一区二区| 奇米影视7777精品一区二区| 夜夜嗨av一区二区三区网页| 国产丝袜在线精品| 欧美精品一区二区在线播放| 91麻豆精品国产自产在线| 色噜噜夜夜夜综合网| www.亚洲精品| 成人激情电影免费在线观看| 国产中文一区二区三区| 日本va欧美va精品| 五月天一区二区三区| 一区二区三区欧美| 亚洲乱码国产乱码精品精小说| 欧美国产精品专区| 国产精品天干天干在线综合| 久久综合一区二区| 久久五月婷婷丁香社区| 2023国产精品| 久久精品视频免费观看| 国产日韩欧美在线一区| 久久久精品国产99久久精品芒果| 精品国精品自拍自在线| 精品国产乱码91久久久久久网站| 91精品国产91热久久久做人人| 欧美日韩国产精品自在自线| 欧美日韩高清影院| 在线综合视频播放| 欧美哺乳videos| 国产亚洲欧美在线| 亚洲欧洲三级电影| 一区二区三区资源| 亚洲成av人片在www色猫咪| 亚洲成人一区二区在线观看| 日日夜夜免费精品| 久久99久久久久| 国产一区二区三区精品视频| 粗大黑人巨茎大战欧美成人| zzijzzij亚洲日本少妇熟睡| 色成年激情久久综合| 欧美色老头old∨ideo| 日韩一区二区三区电影在线观看| 欧美mv和日韩mv国产网站| 国产女主播视频一区二区| 中文字幕一区二区在线播放| 亚洲福利一区二区| 九九**精品视频免费播放| 高清在线成人网| 日本韩国一区二区三区视频| 精品视频1区2区| 精品999久久久| 一区在线中文字幕| 亚洲国产精品天堂| 激情亚洲综合在线| 91网站在线播放| 日韩一区二区精品| 国产精品免费aⅴ片在线观看| 亚洲免费av高清| 另类综合日韩欧美亚洲| 波多野结衣一区二区三区| 7777精品伊人久久久大香线蕉超级流畅| 欧美一区二区三区视频免费播放 | 一区二区三区成人| 免费看日韩a级影片| 国产高清在线精品| 欧美无乱码久久久免费午夜一区| 精品国产伦一区二区三区观看方式 | eeuss鲁一区二区三区| 69久久夜色精品国产69蝌蚪网| 久久久国产一区二区三区四区小说| 一区二区三区**美女毛片| 精品一区二区久久久| 欧美视频完全免费看| 久久丝袜美腿综合| 亚洲午夜免费福利视频| 国产成人精品三级| 欧美一区二区视频网站| 18成人在线视频| 国产综合成人久久大片91| 欧美中文字幕一区二区三区| 国产亚洲一本大道中文在线| 日韩av二区在线播放| 欧美在线999| 中文字幕第一页久久| 看片的网站亚洲| 欧美日韩大陆在线| 亚洲美女少妇撒尿| 粉嫩av一区二区三区在线播放 | 成人免费电影视频| 精品日韩99亚洲| 日韩精品一二三| 在线观看免费成人| 亚洲另类中文字| 高清在线不卡av| 久久久午夜电影| 麻豆久久一区二区| 717成人午夜免费福利电影| 亚洲男人的天堂一区二区| 成人a区在线观看| 国产日本欧洲亚洲| 国产中文字幕一区| 欧美xxxxx裸体时装秀| 日本中文字幕一区二区视频| 欧美私人免费视频| 亚洲一线二线三线久久久| 色偷偷88欧美精品久久久| 国产精品成人午夜| 99国产精品久| 亚洲欧美在线另类| 97久久超碰精品国产| 中文av一区二区| 成人激情视频网站| 成人欧美一区二区三区视频网页| 国产精品中文欧美| 国产欧美一区二区精品性| 国产不卡视频一区二区三区| 国产无遮挡一区二区三区毛片日本| 国模大尺度一区二区三区| 久久综合九色综合久久久精品综合 | 欧美人牲a欧美精品| 亚洲福利一二三区| 69堂亚洲精品首页| 麻豆91在线看| 久久久99精品久久| 成人v精品蜜桃久久一区| 136国产福利精品导航| 日本高清免费不卡视频| 亚洲黄色av一区| 欧美精品一二三| 久久成人免费网| 欧美激情一区二区三区不卡 | 国产精品66部| 中文字幕制服丝袜成人av| 色哟哟在线观看一区二区三区| 亚洲国产一区二区三区青草影视| 欧美另类高清zo欧美| 久久99精品一区二区三区| 国产日本欧美一区二区| 日本韩国欧美一区| 欧美aaaaaa午夜精品| 欧美高清在线一区二区| 91福利在线看| 美女视频黄免费的久久| 日本一区二区三区免费乱视频| 91麻豆免费看片| 欧美aaaaaa午夜精品| 国产精品久久影院| 欧美一区日本一区韩国一区| 国产馆精品极品| 午夜精品一区在线观看|