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

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

?? minute.java

?? jfreechart1.0.1 jsp繪制圖表的開發(fā)包
?? 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.]
 *
 * -----------
 * Minute.java
 * -----------
 * (C) Copyright 2001-2004, by Object Refinery Limited.
 *
 * Original Author:  David Gilbert (for Object Refinery Limited);
 * Contributor(s):   -;
 *
 * $Id: Minute.java,v 1.5.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);
 * 14-Feb-2002 : Fixed bug in Minute(Date) constructor, and changed the range 
 *               to start from zero instead of one (DG);
 * 26-Feb-2002 : Changed getStart(), getMiddle() and getEnd() methods to 
 *               evaluate with reference to a particular time zone (DG);
 * 13-Mar-2002 : Added parseMinute() method (DG);
 * 19-Mar-2002 : Changed API, the minute is now defined in relation to an 
 *               Hour (DG);
 * 10-Sep-2002 : Added getSerialIndex() method (DG);
 * 07-Oct-2002 : Fixed errors reported by Checkstyle (DG);
 * 10-Jan-2003 : Changed base class and method names (DG);
 * 13-Mar-2003 : Moved to com.jrefinery.data.time package and implemented 
 *               Serializable (DG);
 * 21-Oct-2003 : Added hashCode() method, and new constructor for 
 *               convenience (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;

/**
 * Represents a minute.  This class is immutable, which is a requirement for 
 * all {@link RegularTimePeriod} subclasses.
 */
public class Minute extends RegularTimePeriod implements Serializable {

    /** For serialization. */
    private static final long serialVersionUID = 2144572840034842871L;
    
    /** Useful constant for the first minute in a day. */
    public static final int FIRST_MINUTE_IN_HOUR = 0;

    /** Useful constant for the last minute in a day. */
    public static final int LAST_MINUTE_IN_HOUR = 59;

    /** The hour in which the minute falls. */
    private Hour hour;

    /** The minute. */
    private int minute;

    /**
     * Constructs a new Minute, based on the system date/time.
     */
    public Minute() {
        this(new Date());
    }

    /**
     * Constructs a new Minute.
     *
     * @param minute  the minute (0 to 59).
     * @param hour  the hour (<code>null</code> not permitted).
     */
    public Minute(int minute, Hour hour) {
        if (hour == null) {
            throw new IllegalArgumentException("Null 'hour' argument.");
        }
        this.minute = minute;
        this.hour = hour;
    }

    /**
     * Constructs a new Minute, based on the supplied date/time.
     *
     * @param time  the time (<code>null</code> not permitted).
     */
    public Minute(Date time) {
        // defer argument checking
        this(time, RegularTimePeriod.DEFAULT_TIME_ZONE);
    }

    /**
     * Constructs a new Minute, based on the supplied date/time and timezone.
     *
     * @param time  the time (<code>null</code> not permitted).
     * @param zone  the time zone (<code>null</code> not permitted).
     */
    public Minute(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);
        int min = calendar.get(Calendar.MINUTE);
        this.minute = min;
        this.hour = new Hour(time, zone);

    }
    
    /**
     * Creates a new minute.
     * 
     * @param minute  the minute (0-59).
     * @param hour  the hour (0-23).
     * @param day  the day (1-31).
     * @param month  the month (1-12).
     * @param year  the year (1900-9999).
     */
    public Minute(int minute, 
                  int hour, 
                  int day, 
                  int month, 
                  int year) {
        this(minute, new Hour(hour, new Day(day, month, year)));
    }

    /**
     * Returns the hour.
     *
     * @return The hour (never <code>null</code>).
     */
    public Hour getHour() {
        return this.hour;
    }

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

    /**
     * Returns the minute preceding this one.
     *
     * @return The minute preceding this one.
     */
    public RegularTimePeriod previous() {

        Minute result;
        if (this.minute != FIRST_MINUTE_IN_HOUR) {
            result = new Minute(this.minute - 1, this.hour);
        }
        else { // we are at the first minute in the hour...
            Hour prevHour = (Hour) this.hour.previous();
            if (prevHour != null) {
                result = new Minute(LAST_MINUTE_IN_HOUR, prevHour);
            }
            else {
                result = null;
            }
        }
        return result;

    }

    /**
     * Returns the minute following this one.
     *
     * @return The minute following this one.
     */
    public RegularTimePeriod next() {

        Minute result;
        if (this.minute != LAST_MINUTE_IN_HOUR) {
            result = new Minute(this.minute + 1, this.hour);
        }
        else { // we are at the last minute in the hour...
            Hour nextHour = (Hour) this.hour.next();
            if (nextHour != null) {
                result = new Minute(FIRST_MINUTE_IN_HOUR, nextHour);
            }
            else {
                result = null;
            }
        }
        return result;

    }

    /**
     * Returns a serial index number for the minute.
     *
     * @return The serial index number.
     */
    public long getSerialIndex() {
        return this.hour.getSerialIndex() * 60L + this.minute;
    }

    /**
     * Returns the first millisecond of the minute.
     *
     * @param calendar  the calendar (which defines the timezone).
     *
     * @return The first millisecond.
     */
    public long getFirstMillisecond(Calendar calendar) {

        int year = this.hour.getDay().getYear();
        int month = this.hour.getDay().getMonth() - 1;
        int day = this.hour.getDay().getDayOfMonth();

        calendar.clear();
        calendar.set(year, month, day, this.hour.getHour(), this.minute, 0);
        calendar.set(Calendar.MILLISECOND, 0);

        //return calendar.getTimeInMillis();  // this won't work for JDK 1.3
        return calendar.getTime().getTime();

    }

    /**
     * Returns the last millisecond of the minute.
     *
     * @param calendar  the calendar and timezone.
     *
     * @return The last millisecond.
     */
    public long getLastMillisecond(Calendar calendar) {

        int year = this.hour.getDay().getYear();
        int month = this.hour.getDay().getMonth() - 1;
        int day = this.hour.getDay().getDayOfMonth();

        calendar.clear();
        calendar.set(year, month, day, this.hour.getHour(), this.minute, 59);
        calendar.set(Calendar.MILLISECOND, 999);

        //return calendar.getTimeInMillis();  // this won't work for JDK 1.3
        return calendar.getTime().getTime();

    }

    /**
     * Tests the equality of this object against an arbitrary Object.
     * <P>
     * This method will return true ONLY if the object is a Minute object
     * representing the same minute as this instance.
     *
     * @param obj  the object to compare (<code>null</code> permitted).
     *
     * @return <code>true</code> if the minute and hour value of this and the
     *      object are the same.
     */
    public boolean equals(Object obj) {
        if (obj == this) {
            return true;
        }
        if (!(obj instanceof Minute)) {
            return false;
        }
        Minute that = (Minute) obj;
        if (this.minute != that.minute) {
            return false;
        }
        if (!this.hour.equals(that.hour)) {
            return false;
        }
        return true;
    }

    /**
     * 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;
        result = 37 * result + this.minute;
        result = 37 * result + this.hour.hashCode();
        return result;
    }

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

        int result;

        // CASE 1 : Comparing to another Minute object
        // -------------------------------------------
        if (o1 instanceof Minute) {
            Minute m = (Minute) o1;
            result = getHour().compareTo(m.getHour());
            if (result == 0) {
                result = this.minute - m.getMinute();
            }
        }

        // 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;

    }

    /**
     * Creates a Minute instance by parsing a string.  The string is assumed to
     * be in the format "YYYY-MM-DD HH:MM", perhaps with leading or trailing
     * whitespace.
     *
     * @param s  the minute string to parse.
     *
     * @return <code>null</code>, if the string is not parseable, the minute
     *      otherwise.
     */
    public static Minute parseMinute(String s) {

        Minute result = null;
        s = s.trim();

        String daystr = s.substring(0, Math.min(10, s.length()));
        Day day = Day.parseDay(daystr);
        if (day != null) {
            String hmstr = s.substring(
                Math.min(daystr.length() + 1, s.length()), s.length()
            );
            hmstr = hmstr.trim();

            String hourstr = hmstr.substring(0, Math.min(2, hmstr.length()));
            int hour = Integer.parseInt(hourstr);

            if ((hour >= 0) && (hour <= 23)) {
                String minstr = hmstr.substring(
                    Math.min(hourstr.length() + 1, hmstr.length()), 
                    hmstr.length()
                );
                int minute = Integer.parseInt(minstr);
                if ((minute >= 0) && (minute <= 59)) {
                    result = new Minute(minute, new Hour(hour, day));
                }
            }
        }

        return result;

    }

}

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产亚洲精品中文字幕| 在线一区二区三区做爰视频网站| 成人app软件下载大全免费| 日本韩国欧美一区| 精品播放一区二区| 一区av在线播放| 国产乱人伦精品一区二区在线观看| 91丝袜美腿高跟国产极品老师| 91精品国模一区二区三区| 精品国产免费人成电影在线观看四季| 亚洲欧洲日韩女同| 经典一区二区三区| 欧美伊人精品成人久久综合97| 26uuu久久综合| 亚洲电影一区二区三区| 岛国精品在线观看| 欧美videofree性高清杂交| 亚洲欧美一区二区不卡| 黄色日韩网站视频| 欧美猛男gaygay网站| 综合久久国产九一剧情麻豆| 麻豆精品在线播放| 欧美午夜免费电影| 国产日韩欧美不卡在线| 麻豆91精品91久久久的内涵| 91福利国产成人精品照片| 日韩精品一区二区三区中文不卡| 一区二区久久久久久| 丁香桃色午夜亚洲一区二区三区| 欧美视频一区二区三区四区 | 国产色产综合色产在线视频| 日韩精品一级中文字幕精品视频免费观看 | 久久精品国产在热久久| 欧美色图12p| 中文字幕精品在线不卡| 久久99久国产精品黄毛片色诱| 欧美性极品少妇| 日韩理论片在线| 粉嫩高潮美女一区二区三区| 日韩欧美国产综合| 婷婷久久综合九色国产成人| 色婷婷综合久久| 中文一区在线播放| 国产精品18久久久久久久久| 久久综合九色综合97_久久久| 麻豆精品在线播放| 久久这里只有精品视频网| 国产在线一区观看| 国产视频在线观看一区二区三区| 国产精品456露脸| 国产欧美日韩另类一区| 成人不卡免费av| 国产精品成人免费在线| 一本大道久久精品懂色aⅴ| 亚洲精品视频在线观看免费| 色一区在线观看| 亚洲国产精品精华液网站| 在线不卡一区二区| 麻豆精品精品国产自在97香蕉| 欧美xxxx在线观看| 国产成人在线网站| 最新高清无码专区| 欧美色成人综合| 美国欧美日韩国产在线播放| 久久综合九色综合久久久精品综合| 国产成人亚洲精品青草天美 | 欧美色图天堂网| 日日摸夜夜添夜夜添国产精品| 欧美一级淫片007| 国产乱人伦精品一区二区在线观看| 国产日产精品一区| 色欧美日韩亚洲| 亚洲r级在线视频| 精品免费一区二区三区| 成人免费观看视频| 亚洲午夜精品网| 日韩欧美电影一区| 成人av在线播放网址| 亚洲午夜久久久久久久久电影网| 日韩欧美一区二区久久婷婷| 国产精品99久久久久久有的能看 | 久久久精品免费网站| 99久久99久久精品免费观看| 亚洲二区视频在线| 久久久久久99久久久精品网站| 99re66热这里只有精品3直播| 午夜久久久久久| 国产片一区二区三区| 欧美怡红院视频| 国产乱码字幕精品高清av | 久久精品人人爽人人爽| 91丝袜国产在线播放| 美女网站在线免费欧美精品| 国产欧美日本一区视频| 欧美手机在线视频| 国产麻豆成人传媒免费观看| 亚洲日穴在线视频| 日韩欧美一级二级三级久久久| 成人一级视频在线观看| 亚洲成人免费看| 国产亚洲欧美色| 欧美日韩免费一区二区三区| 国产v综合v亚洲欧| 日本不卡一二三区黄网| 亚洲欧洲www| 日韩欧美中文字幕公布| 色综合天天综合色综合av| 激情综合网天天干| 亚洲一区二区不卡免费| 国产日产欧美精品一区二区三区| 欧美日韩国产中文| 97aⅴ精品视频一二三区| 精品一区二区免费| 亚洲亚洲精品在线观看| 国产精品第四页| 久久女同精品一区二区| 欧美日韩一级片在线观看| 成人毛片老司机大片| 久久精品72免费观看| 亚洲成av人综合在线观看| 国产精品理伦片| 久久久久亚洲蜜桃| 91精品国产综合久久久久久漫画 | 色综合久久综合网欧美综合网| 国产在线观看一区二区| 五月天亚洲婷婷| 一区二区三区日本| 欧美国产日韩在线观看| 精品国产一区二区精华| 91精品蜜臀在线一区尤物| 欧美亚男人的天堂| 99精品国产一区二区三区不卡 | 亚洲视频每日更新| 国产欧美一区二区精品婷婷 | 在线观看日韩精品| 成人av综合在线| 高清av一区二区| 国产高清在线精品| 国产精品正在播放| 精品亚洲国产成人av制服丝袜 | 亚洲精品视频免费观看| 国产精品二三区| 国产精品色哟哟网站| 久久久久9999亚洲精品| 精品欧美黑人一区二区三区| 91精品国产综合久久福利软件| 欧美在线色视频| 色狠狠av一区二区三区| av成人动漫在线观看| 成人深夜视频在线观看| 国产91露脸合集magnet| 国产麻豆成人精品| 国产高清视频一区| 国产精品一品二品| 国产精品一品视频| 国产91丝袜在线播放| 国产91丝袜在线播放0| 成人亚洲一区二区一| 懂色av一区二区夜夜嗨| 成人黄色在线网站| av资源网一区| 99精品一区二区三区| 色综合激情久久| 欧美午夜宅男影院| 欧美片网站yy| 日韩欧美亚洲一区二区| 欧美成人福利视频| 久久久精品免费免费| 国产精品乱人伦中文| 最新久久zyz资源站| 一区二区三区在线免费观看| 亚洲午夜精品在线| 日韩 欧美一区二区三区| 蜜桃av一区二区在线观看| 精品一区二区三区的国产在线播放 | 国产欧美一区二区精品性 | 91精品福利在线一区二区三区| 欧美一区二区三区在线观看视频| 日韩欧美在线影院| 久久免费视频一区| 国产精品久久夜| 亚洲精品第1页| 天堂成人免费av电影一区| 麻豆成人免费电影| 风流少妇一区二区| 一本到不卡免费一区二区| 欧美精品在线观看播放| 欧美不卡一二三| 欧美国产丝袜视频| 亚洲国产精品精华液网站| 免费看欧美女人艹b| 国产福利一区二区三区视频在线 | 久久99久久99| 白白色亚洲国产精品| 91久久精品一区二区三区| 91麻豆精品国产| 国产蜜臀av在线一区二区三区| 亚洲摸摸操操av| 奇米影视7777精品一区二区| 国产精品系列在线观看|