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

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

?? regulartimeperiod.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.]
 *
 * ----------------------
 * RegularTimePeriod.java
 * ----------------------
 * (C) Copyright 2001-2005, by Object Refinery Limited.
 *
 * Original Author:  David Gilbert (for Object Refinery Limited);
 * Contributor(s):   -;
 *
 * $Id: RegularTimePeriod.java,v 1.6.2.1 2005/10/25 21:35:24 mungady Exp $
 *
 * Changes
 * -------
 * 11-Oct-2001 : Version 1 (DG);
 * 26-Feb-2002 : Changed getStart(), getMiddle() and getEnd() methods to 
 *               evaluate with reference to a particular time zone (DG);
 * 29-May-2002 : Implemented MonthConstants interface, so that these constants 
 *               are conveniently available (DG);
 * 10-Sep-2002 : Added getSerialIndex() method (DG);
 * 10-Jan-2003 : Renamed TimePeriod --> RegularTimePeriod (DG);
 * 13-Mar-2003 : Moved to com.jrefinery.data.time package (DG);
 * 29-Apr-2004 : Changed getMiddleMillisecond() methods to fix bug 943985 (DG);
 * 25-Nov-2004 : Added utility methods (DG);
 *
 */

package org.jfree.data.time;

import java.lang.reflect.Constructor;
import java.util.Calendar;
import java.util.Date;
import java.util.TimeZone;

import org.jfree.date.MonthConstants;

/**
 * An abstract class representing a unit of time.  Convenient methods are 
 * provided for calculating the next and previous time periods.  Conversion 
 * methods are defined that return the first and last milliseconds of the time 
 * period.  The results from these methods are timezone dependent.
 * <P>
 * This class is immutable, and all subclasses should be immutable also.
 */
public abstract class RegularTimePeriod implements TimePeriod, Comparable, 
                                                   MonthConstants {

    /**
     * Creates a time period that includes the specified millisecond, assuming 
     * the given time zone.
     * 
     * @param c  the time period class.
     * @param millisecond  the time.
     * @param zone  the time zone.
     * 
     * @return The time period.
     */
    public static RegularTimePeriod createInstance(Class c, Date millisecond, 
                                                   TimeZone zone) {
        RegularTimePeriod result = null;
        try {
            Constructor constructor = c.getDeclaredConstructor(
                new Class[] {Date.class, TimeZone.class}
            );
            result = (RegularTimePeriod) constructor.newInstance(
                new Object[] {millisecond, zone}
            );
        }
        catch (Exception e) {
            // do nothing, so null is returned            
        }
        return result;  
    }
    
    /**
     * Returns a subclass of {@link RegularTimePeriod} that is smaller than
     * the specified class.
     * 
     * @param c  a subclass of {@link RegularTimePeriod}.
     * 
     * @return A class.
     */
    public static Class downsize(Class c) {
        if (c.equals(Year.class)) {
            return Quarter.class;
        }
        else if (c.equals(Quarter.class)) {
            return Month.class;
        }
        else if (c.equals(Month.class)) {
            return Day.class;
        }
        else if (c.equals(Day.class)) {
            return Hour.class;
        }
        else if (c.equals(Hour.class)) {
            return Minute.class;
        }
        else if (c.equals(Minute.class)) {
            return Second.class;
        }
        else if (c.equals(Second.class)) {
            return Millisecond.class;
        }
        else {
            return Millisecond.class;
        }
    }
    
    /**
     * Returns the time period preceding this one, or <code>null</code> if some
     * lower limit has been reached.
     *
     * @return The previous time period (possibly <code>null</code>).
     */
    public abstract RegularTimePeriod previous();

    /**
     * Returns the time period following this one, or <code>null</code> if some
     * limit has been reached.
     *
     * @return The next time period (possibly <code>null</code>).
     */
    public abstract RegularTimePeriod next();

    /**
     * Returns a serial index number for the time unit.
     *
     * @return The serial index number.
     */
    public abstract long getSerialIndex();

    //////////////////////////////////////////////////////////////////////////

    /** The default time zone. */
    public static final TimeZone DEFAULT_TIME_ZONE = TimeZone.getDefault();

    /** A working calendar (recycle to avoid unnecessary object creation). */
    public static final Calendar WORKING_CALENDAR 
        = Calendar.getInstance(DEFAULT_TIME_ZONE);

    /**
     * Returns the date/time that marks the start of the time period.
     *
     * @return The start date/time.
     */
    public Date getStart() {
        return new Date(getFirstMillisecond());
    }

    /**
     * Returns the date/time that marks the end of the time period.
     *
     * @return The end date/time.
     */
    public Date getEnd() {
        return new Date(getLastMillisecond());
    }

    /**
     * Returns the first millisecond of the time period, evaluated in the 
     * default time zone.
     *
     * @return The first millisecond of the time period.
     */
    public long getFirstMillisecond() {
        return getFirstMillisecond(DEFAULT_TIME_ZONE);
    }

    /**
     * Returns the first millisecond of the time period, evaluated within a 
     * specific time zone.
     *
     * @param zone  the time zone.
     *
     * @return The first millisecond of the time period.
     */
    public long getFirstMillisecond(TimeZone zone) {
        WORKING_CALENDAR.setTimeZone(zone);
        return getFirstMillisecond(WORKING_CALENDAR);
    }

    /**
     * Returns the first millisecond of the time period, evaluated using the 
     * supplied calendar (which incorporates a timezone).
     *
     * @param calendar  the calendar.
     *
     * @return The first millisecond of the time period.
     */
    public abstract long getFirstMillisecond(Calendar calendar);

    /**
     * Returns the last millisecond of the time period, evaluated in the 
     * default time zone.
     *
     * @return The last millisecond of the time period.
     */
    public long getLastMillisecond() {
        return getLastMillisecond(DEFAULT_TIME_ZONE);
    }

    /**
     * Returns the last millisecond of the time period, evaluated within a 
     * specific time zone.
     *
     * @param zone  the time zone.
     *
     * @return The last millisecond of the time period.
     */
    public long getLastMillisecond(TimeZone zone) {
        WORKING_CALENDAR.setTimeZone(zone);
        return getLastMillisecond(WORKING_CALENDAR);
    }

    /**
     * Returns the last millisecond of the time period, evaluated using the 
     * supplied calendar (which incorporates a timezone).
     *
     * @param calendar  the calendar.
     *
     * @return The last millisecond of the time period.
     */
    public abstract long getLastMillisecond(Calendar calendar);

    /**
     * Returns the millisecond closest to the middle of the time period,
     * evaluated in the default time zone.
     *
     * @return The middle millisecond.
     */
    public long getMiddleMillisecond() {
        long m1 = getFirstMillisecond();
        long m2 = getLastMillisecond();
        return m1 + (m2 - m1) / 2;
    }

    /**
     * Returns the millisecond closest to the middle of the time period,
     * evaluated within a specific time zone.
     *
     * @param zone  the time zone.
     *
     * @return The middle millisecond.
     */
    public long getMiddleMillisecond(TimeZone zone) {
        long m1 = getFirstMillisecond(zone);
        long m2 = getLastMillisecond(zone);
        return m1 + (m2 - m1) / 2;
    }

    /**
     * Returns the millisecond closest to the middle of the time period,
     * evaluated using the supplied calendar (which incorporates a timezone).
     *
     * @param calendar  the calendar.
     *
     * @return The middle millisecond.
     */
    public long getMiddleMillisecond(Calendar calendar) {
        long m1 = getFirstMillisecond(calendar);
        long m2 = getLastMillisecond(calendar);
        return m1 + (m2 - m1) / 2;
    }

    /**
     * Returns a string representation of the time period.
     *
     * @return The string.
     */
    public String toString() {
        return String.valueOf(getStart());
    }

}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲成人动漫精品| 国产一区二区三区四区五区入口| 日韩成人一区二区| 不卡一区二区在线| 日韩欧美精品三级| 亚洲影院久久精品| jizzjizzjizz欧美| 久久日一线二线三线suv| 亚洲综合自拍偷拍| www.日本不卡| 日本一区二区电影| 麻豆精品久久久| 欧美色中文字幕| 国产精品美女久久久久久| 久久国产生活片100| 欧美日韩中文国产| 亚洲一区在线电影| 91麻豆精品视频| 欧美国产日韩精品免费观看| 免费成人深夜小野草| 欧美日韩一区二区三区四区| 亚洲蜜臀av乱码久久精品蜜桃| 国产久卡久卡久卡久卡视频精品| 5566中文字幕一区二区电影| 亚洲综合偷拍欧美一区色| 91丝袜呻吟高潮美腿白嫩在线观看| ww亚洲ww在线观看国产| 激情综合色播激情啊| 91精品国产色综合久久| 同产精品九九九| 精品视频999| 亚洲成av人片在www色猫咪| 在线日韩一区二区| 亚洲一区在线观看免费观看电影高清 | 欧美亚洲另类激情小说| 国产精品精品国产色婷婷| 高清免费成人av| 欧美国产精品中文字幕| 粉嫩嫩av羞羞动漫久久久 | 成人精品一区二区三区四区| 国产丝袜美腿一区二区三区| 国产精品综合av一区二区国产馆| 久久伊99综合婷婷久久伊| 国产一区二区三区精品视频| 国产调教视频一区| 成人av动漫在线| 亚洲精品成人悠悠色影视| 色天天综合色天天久久| 亚洲成人你懂的| 欧美高清视频一二三区| 美女诱惑一区二区| 久久久久久久久久久久电影 | 欧美日韩国产小视频在线观看| 亚洲制服丝袜av| 日韩亚洲欧美高清| 国产激情一区二区三区四区| 国产精品美女久久久久aⅴ| 91亚洲男人天堂| 日韩精品视频网站| 久久久久成人黄色影片| 91性感美女视频| 日本视频在线一区| 国产精品女人毛片| 欧美特级限制片免费在线观看| 日本午夜一区二区| 国产精品高潮呻吟| 欧美丰满一区二区免费视频| 国产乱子轮精品视频| 亚洲人成影院在线观看| 91精品婷婷国产综合久久竹菊| 国产一区在线观看视频| 亚洲欧美国产三级| 欧美岛国在线观看| 在线影院国内精品| 激情综合网激情| 亚洲综合免费观看高清在线观看| 日韩欧美视频在线 | 成人黄页在线观看| 婷婷综合在线观看| 亚洲欧美视频在线观看视频| 56国语精品自产拍在线观看| 91在线国产观看| 黄一区二区三区| 亚洲一区国产视频| 亚洲欧洲日韩在线| 欧美大片拔萝卜| 欧美性videosxxxxx| 国产成人av影院| 日本不卡视频一二三区| 尤物在线观看一区| 国产欧美中文在线| 欧美成人女星排行榜| 欧美亚洲综合色| 一本一道久久a久久精品 | 天天综合天天综合色| 国产精品视频一二| 26uuuu精品一区二区| 欧美精品久久久久久久多人混战| av一区二区三区在线| 国产精品一区二区在线播放| 日本欧美大码aⅴ在线播放| 亚洲小说春色综合另类电影| 国产精品久久久久婷婷| 国产亚洲精品资源在线26u| 日韩欧美成人一区| 欧美一区二区久久| 欧美精品99久久久**| 欧美美女bb生活片| 欧美性三三影院| 一本到三区不卡视频| 99热99精品| 91免费看片在线观看| 成人av集中营| 91丨porny丨中文| 91免费在线看| 波多野结衣精品在线| 91精品办公室少妇高潮对白| 亚洲三级小视频| 国产精品亚洲综合一区在线观看| 欧美精品一区二区久久婷婷| 欧美一级片免费看| 欧美一级高清大全免费观看| 欧美狂野另类xxxxoooo| 欧美电影在哪看比较好| 91精选在线观看| 欧美一级搡bbbb搡bbbb| 欧美电影免费观看高清完整版在线观看| 欧美一区二区三区免费视频 | 亚洲色图一区二区三区| 亚洲欧美另类综合偷拍| 依依成人综合视频| 偷拍与自拍一区| 国产综合久久久久影院| 成人性生交大片免费| 色综合天天综合在线视频| 欧洲av在线精品| 日韩一级二级三级精品视频| 在线观看91av| 日韩欧美一二区| 欧美日韩国产首页在线观看| 一区在线观看视频| 精品日韩99亚洲| 国产精品激情偷乱一区二区∴| 亚洲欧美视频在线观看视频| 亚洲一区在线电影| 九一久久久久久| av激情综合网| 欧美肥妇毛茸茸| 国产婷婷一区二区| 亚洲一区二区不卡免费| 久久99久久久久久久久久久| 成人av综合在线| 欧美日韩在线三级| 久久久久成人黄色影片| 亚洲综合色成人| 国产盗摄一区二区| 欧美三级中文字| 国产免费久久精品| 亚洲h动漫在线| 国产99一区视频免费| 欧美三级视频在线观看| 中文字幕不卡的av| 日韩avvvv在线播放| heyzo一本久久综合| 日韩精品一区二| 亚洲综合色自拍一区| 色综合中文综合网| 99久久精品情趣| 精品久久久久久综合日本欧美| 综合欧美亚洲日本| 久久激情五月激情| 欧美日韩一级二级| 国产精品久久久久久久久晋中| 日本vs亚洲vs韩国一区三区二区 | 97久久超碰国产精品| 欧美成人aa大片| 亚洲电影一级黄| 91视频91自| 国产日韩综合av| 激情文学综合丁香| 亚洲福利一二三区| 欧美三级一区二区| 一区在线播放视频| 国产一区二区三区电影在线观看 | 色综合天天做天天爱| 国产日韩欧美制服另类| 麻豆精品久久久| 91精品国产综合久久久久| 亚洲自拍欧美精品| 91女人视频在线观看| 国产精品私人影院| 成人性生交大片免费看中文网站| 日韩午夜精品视频| 蜜臀久久久久久久| 69久久99精品久久久久婷婷| 亚洲国产精品久久艾草纯爱| 91国产成人在线| 亚洲一卡二卡三卡四卡无卡久久| 色香蕉成人二区免费| 亚洲免费观看在线观看|