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

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

?? year.java

?? jfreechart1.0.1 jsp繪制圖表的開發包
?? JAVA
字號:
/* ===========================================================
 * 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.]
 *
 * ---------
 * Year.java
 * ---------
 * (C) Copyright 2001-2005, by Object Refinery Limited.
 *
 * Original Author:  David Gilbert (for Object Refinery Limited);
 * Contributor(s):   -;
 *
 * $Id: Year.java,v 1.9.2.1 2005/10/25 21:35:24 mungady Exp $
 *
 * Changes
 * -------
 * 11-Oct-2001 : Version 1 (DG);
 * 14-Nov-2001 : Override for toString() method (DG);
 * 19-Dec-2001 : Added a new constructor as suggested by Paul English (DG);
 * 29-Jan-2002 : Worked on parseYear() method (DG);
 * 14-Feb-2002 : Fixed bug in Year(Date) constructor (DG);
 * 26-Feb-2002 : Changed getStart(), getMiddle() and getEnd() methods to 
 *               evaluate with reference to a particular time zone (DG);
 * 19-Mar-2002 : Changed API for TimePeriod classes (DG);
 * 10-Sep-2002 : Added getSerialIndex() method (DG);
 * 04-Oct-2002 : Fixed errors reported by Checkstyle (DG);
 * 10-Jan-2003 : Changed base class and method names (DG);
 * 05-Mar-2003 : Fixed bug in getFirstMillisecond() picked up in JUnit 
 *               tests (DG);
 * 13-Mar-2003 : Moved to com.jrefinery.data.time package, and implemented 
 *               Serializable (DG);
 * 21-Oct-2003 : Added hashCode() method (DG);
 * 
 */

package org.jfree.data.time;

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

import org.jfree.date.MonthConstants;
import org.jfree.date.SerialDate;

/**
 * Represents a year in the range 1900 to 9999.  This class is immutable, which
 * is a requirement for all {@link RegularTimePeriod} subclasses.
 */
public class Year extends RegularTimePeriod implements Serializable {

    /** For serialization. */
    private static final long serialVersionUID = -7659990929736074836L;
    
    /** The year. */
    private int year;

    /**
     * Creates a new <code>Year</code>, based on the current system date/time.
     */
    public Year() {
        this(new Date());
    }

    /**
     * Creates a time period representing a single year.
     *
     * @param year  the year.
     */
    public Year(int year) {

        // check arguments...
        if ((year < SerialDate.MINIMUM_YEAR_SUPPORTED)
            || (year > SerialDate.MAXIMUM_YEAR_SUPPORTED)) {

            throw new IllegalArgumentException(
                "Year constructor: year (" + year + ") outside valid range.");
        }

        // initialise...
        this.year = year;

    }

    /**
     * Creates a new <code>Year</code>, based on a particular instant in time, 
     * using the default time zone.
     *
     * @param time  the time.
     */
    public Year(Date time) {
        this(time, RegularTimePeriod.DEFAULT_TIME_ZONE);
    }

    /**
     * Constructs a year, based on a particular instant in time and a time zone.
     *
     * @param time  the time.
     * @param zone  the time zone.
     */
    public Year(Date time, TimeZone zone) {

        Calendar calendar = Calendar.getInstance(zone);
        calendar.setTime(time);
        this.year = calendar.get(Calendar.YEAR);

    }

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

    /**
     * Returns the year preceding this one.
     *
     * @return The year preceding this one (or <code>null</code> if the 
     *         current year is 1900).
     */
    public RegularTimePeriod previous() {
        if (this.year > SerialDate.MINIMUM_YEAR_SUPPORTED) {
            return new Year(this.year - 1);
        }
        else {
            return null;
        }
    }

    /**
     * Returns the year following this one.
     *
     * @return The year following this one (or <code>null</code> if the current
     *         year is 9999).
     */
    public RegularTimePeriod next() {
        if (this.year < SerialDate.MAXIMUM_YEAR_SUPPORTED) {
            return new Year(this.year + 1);
        }
        else {
            return null;
        }
    }

    /**
     * Returns a serial index number for the year.
     * <P>
     * The implementation simply returns the year number (e.g. 2002).
     *
     * @return The serial index number.
     */
    public long getSerialIndex() {
        return this.year;
    }

    /**
     * Returns the first millisecond of the year, evaluated using the supplied
     * calendar (which determines the time zone).
     *
     * @param calendar  the calendar.
     *
     * @return The first millisecond of the year.
     */
    public long getFirstMillisecond(Calendar calendar) {
        Day jan1 = new Day(1, MonthConstants.JANUARY, this.year);
        return jan1.getFirstMillisecond(calendar);
    }

    /**
     * Returns the last millisecond of the year, evaluated using the supplied
     * calendar (which determines the time zone).
     *
     * @param calendar  the calendar.
     *
     * @return The last millisecond of the year.
     */
    public long getLastMillisecond(Calendar calendar) {
        Day dec31 = new Day(31, MonthConstants.DECEMBER, this.year);
        return dec31.getLastMillisecond(calendar);
    }

    /**
     * Tests the equality of this <code>Year</code> object to an arbitrary 
     * object.  Returns <code>true</code> if the target is a <code>Year</code>
     * instance representing the same year as this object.  In all other cases,
     * returns <code>false</code>.
     *
     * @param object  the object.
     *
     * @return <code>true</code> if the year of this and the object are the 
     *         same.
     */
    public boolean equals(Object object) {
        if (object != null) {
            if (object instanceof Year) {
                Year target = (Year) object;
                return (this.year == target.getYear());
            }
            else {
                return false;
            }
        }
        else {
            return false;
        }
    }
    
    /**
     * Returns a hash code for this object instance.  The approach described by
     * Joshua Bloch in "Effective Java" has been used here:
     * <p>
     * <code>http://developer.java.sun.com/developer/Books/effectivejava
     *     /Chapter3.pdf</code>
     * 
     * @return A hash code.
     */
    public int hashCode() {
        int result = 17;
        int c = this.year;
        result = 37 * result + c;
        return result;
    }

    /**
     * Returns an integer indicating the order of this <code>Year</code> object
     * relative to the specified object:
     *
     * negative == before, zero == same, positive == after.
     *
     * @param o1  the object to compare.
     *
     * @return negative == before, zero == same, positive == after.
     */
    public int compareTo(Object o1) {

        int result;

        // CASE 1 : Comparing to another Year object
        // -----------------------------------------
        if (o1 instanceof Year) {
            Year y = (Year) o1;
            result = this.year - y.getYear();
        }

        // CASE 2 : Comparing to another TimePeriod object
        // -----------------------------------------------
        else if (o1 instanceof RegularTimePeriod) {
            // more difficult case - evaluate later...
            result = 0;
        }

        // CASE 3 : Comparing to a non-TimePeriod object
        // ---------------------------------------------
        else {
            // consider time periods to be ordered after general objects
            result = 1;
        }

        return result;

    }

    /**
     * Returns a string representing the year..
     *
     * @return A string representing the year.
     */
    public String toString() {
        return Integer.toString(this.year);
    }

    /**
     * Parses the string argument as a year.
     * <P>
     * The string format is YYYY.
     *
     * @param s  a string representing the year.
     *
     * @return <code>null</code> if the string is not parseable, the year 
     *         otherwise.
     */
    public static Year parseYear(String s) {

        // parse the string...
        int y;
        try {
            y = Integer.parseInt(s.trim());
        }
        catch (NumberFormatException e) {
            throw new TimePeriodFormatException("Cannot parse string.");
        }

        // create the year...
        try {
            return new Year(y);
        }
        catch (IllegalArgumentException e) {
            throw new TimePeriodFormatException("Year outside valid range.");
        }
    }

}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产成人精品免费看| 2020国产精品自拍| 欧美三级一区二区| 欧美日韩的一区二区| 欧美二区在线观看| 国产午夜精品一区二区三区视频 | 成人久久久精品乱码一区二区三区| 国产乱淫av一区二区三区| 黄一区二区三区| av一区二区三区四区| 蜜臀a∨国产成人精品| 国产精品一区二区免费不卡| 成人18精品视频| 国产日韩欧美麻豆| 在线精品视频一区二区三四| 日韩手机在线导航| 日本系列欧美系列| 久久久亚洲综合| 亚洲一区日韩精品中文字幕| 成人免费高清在线| 国产欧美精品在线观看| 久久99热这里只有精品| 国内精品嫩模私拍在线| 久久亚洲二区三区| 国产99一区视频免费| 26uuu亚洲| 成人午夜免费电影| 国产精品二区一区二区aⅴ污介绍| 亚洲黄色免费电影| 欧美自拍丝袜亚洲| 视频一区视频二区中文字幕| 91精品国产91热久久久做人人| 日韩国产在线观看| 久久综合成人精品亚洲另类欧美| 久久国产精品72免费观看| 精品国产欧美一区二区| 国内精品免费**视频| 日本一区二区不卡视频| 色天天综合色天天久久| 午夜日韩在线观看| 欧美成人vps| 国产美女在线观看一区| 国产精品久久久久桃色tv| voyeur盗摄精品| 一区二区三区日韩精品| 欧美精选在线播放| 国产一区91精品张津瑜| 一区二区三区四区不卡在线 | 亚洲免费色视频| 欧美亚洲综合网| 老司机午夜精品| 久久久久久久久久久99999| 成人的网站免费观看| 国产精品天天摸av网| 欧美三级在线看| 奇米精品一区二区三区在线观看一 | 91丨porny丨国产入口| 一个色综合网站| 国产婷婷色一区二区三区| 国产凹凸在线观看一区二区| 国产精品国产自产拍高清av王其| eeuss鲁片一区二区三区| 亚洲一区二区三区精品在线| 91精品久久久久久久91蜜桃| 国内精品国产三级国产a久久 | 成人激情校园春色| 国产河南妇女毛片精品久久久| 毛片一区二区三区| 午夜欧美电影在线观看| 亚洲另类在线制服丝袜| 国产精品白丝在线| 国产色一区二区| 日韩精品一区二区在线观看| 99v久久综合狠狠综合久久| 精品中文字幕一区二区小辣椒| 亚洲成人精品一区| 亚洲一区二区在线播放相泽| 亚洲综合一区二区三区| 亚洲mv在线观看| 三级影片在线观看欧美日韩一区二区 | 久久久精品欧美丰满| 亚洲精品一区二区三区99| 欧美xxxx老人做受| 精品国产一区二区三区久久影院| 欧美一区二区福利视频| 日韩三级伦理片妻子的秘密按摩| 日韩欧美国产综合| 精品免费国产一区二区三区四区| 久久亚洲一区二区三区明星换脸| 26uuu亚洲综合色欧美| 国产精品福利一区二区| 久久精品国产亚洲aⅴ| 一本到不卡免费一区二区| 久久综合精品国产一区二区三区 | 色视频一区二区| 久久久久久久av麻豆果冻| 中文字幕精品一区二区精品绿巨人| 国产精品美女久久久久久| 亚洲bt欧美bt精品777| 日韩avvvv在线播放| 成人av网站在线观看免费| 色欲综合视频天天天| 久久精品夜色噜噜亚洲a∨| 亚洲成在人线在线播放| 麻豆视频观看网址久久| 91视频国产资源| 精品国精品自拍自在线| 一区二区三区自拍| 国产成人在线影院 | 免费美女久久99| 色综合色综合色综合色综合色综合 | 韩国成人福利片在线播放| 亚洲成人中文在线| 色爱区综合激月婷婷| 国产亚洲欧美激情| 国产高清精品在线| 精品国产91乱码一区二区三区| 亚洲va中文字幕| 欧美日韩一区二区在线观看视频| 亚洲三级免费观看| 91一区二区三区在线观看| 国产精品精品国产色婷婷| 成人精品国产福利| 久久久午夜电影| 国产老肥熟一区二区三区| 亚洲男同性视频| 欧美日本一区二区三区四区| 日本欧美一区二区三区乱码| 国产日韩v精品一区二区| 久久机这里只有精品| 日韩精品一区二区三区在线观看| 免费高清成人在线| 欧美在线视频不卡| 欧美成人女星排行榜| 中文字幕欧美日韩一区| 一区二区中文视频| 日本视频在线一区| 色综合色狠狠综合色| 国产亚洲欧洲一区高清在线观看| 一区二区三区美女| 亚洲综合色视频| 国产成人精品网址| 日韩一区二区三区视频在线观看| 国产精品色眯眯| 国产一区二区在线免费观看| 欧美二区三区的天堂| 久久精品国产亚洲a| 99综合影院在线| 欧美精品日韩精品| 偷拍一区二区三区| 成人免费毛片片v| 欧美精品一区二区久久久| 亚洲大尺度视频在线观看| av中文字幕一区| 中文字幕在线视频一区| av在线播放成人| 亚洲成av人片| 色婷婷综合久色| 亚洲免费在线视频一区 二区| 韩国精品免费视频| 精品国精品国产尤物美女| 日韩av高清在线观看| 欧美唯美清纯偷拍| 亚洲综合色网站| 在线看日韩精品电影| 一区二区三区**美女毛片| jlzzjlzz欧美大全| 亚洲三级小视频| 92精品国产成人观看免费| 国产三区在线成人av| 26uuuu精品一区二区| 3d动漫精品啪啪| 国产精品久久久久久久久搜平片| 国产在线视视频有精品| 国产精品69毛片高清亚洲| 国产伦精品一区二区三区在线观看 | 一区二区三区四区不卡视频| 欧美一区二区三区日韩视频| 99免费精品在线| 精品在线播放免费| 亚洲视频在线一区观看| 综合色天天鬼久久鬼色| 久久新电视剧免费观看| 欧美性色欧美a在线播放| 成人免费视频播放| 三级亚洲高清视频| 国产精品久久综合| 欧美一区二区视频在线观看2022| 狠狠色丁香久久婷婷综| 国产一区二区三区在线观看免费视频 | av一二三不卡影片| 色综合久久综合网欧美综合网| 欧美日韩在线三级| 欧美电影免费观看完整版| 亚洲国产电影在线观看| 亚洲综合成人在线| 麻豆精品在线观看| www.成人网.com| 欧美一区二区三区思思人| 中文字幕一区二区三中文字幕|