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

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

?? second.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.]
 *
 * -----------
 * Second.java
 * -----------
 * (C) Copyright 2001-2005, by Object Refinery Limited.
 *
 * Original Author:  David Gilbert (for Object Refinery Limited);
 * Contributor(s):   -;
 *
 * $Id: Second.java,v 1.6.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 Second(Date) constructor, and changed start of 
 *               range to zero from 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 parseSecond() method (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);
 * 05-Mar-2003 : Fixed bug in getLastMillisecond() 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;

/**
 * Represents a second in a particular day.  This class is immutable, which is 
 * a requirement for all {@link RegularTimePeriod} subclasses.
 */
public class Second extends RegularTimePeriod implements Serializable {

    /** For serialization. */
    private static final long serialVersionUID = -6536564190712383466L;
    
    /** Useful constant for the first second in a minute. */
    public static final int FIRST_SECOND_IN_MINUTE = 0;

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

    /** The minute. */
    private Minute minute;

    /** The second. */
    private int second;

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

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

    /**
     * Creates a new second.
     * 
     * @param second  the second (0-59).
     * @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 Second(int second, int minute, int hour, 
                  int day, int month, int year) {
        this(second, new Minute(minute, hour, day, month, year));    
    }
    
    /**
     * Constructs a second.
     *
     * @param time  the time.
     */
    public Second(Date time) {
        this(time, RegularTimePeriod.DEFAULT_TIME_ZONE);
    }

    /**
     * Creates a new second based on the supplied time and time zone.
     *
     * @param time  the instant in time.
     * @param zone  the time zone.
     */
    public Second(Date time, final TimeZone zone) {
        this.minute = new Minute(time, zone);
        Calendar calendar = Calendar.getInstance(zone);
        calendar.setTime(time);
        this.second = calendar.get(Calendar.SECOND);
    }

    /**
     * Returns the second within the minute.
     *
     * @return The second (0 - 59).
     */
    public int getSecond() {
        return this.second;
    }

    /**
     * Returns the minute.
     *
     * @return The minute (never <code>null</code>).
     */
    public Minute getMinute() {
        return this.minute;
    }

    /**
     * Returns the second preceding this one.
     *
     * @return The second preceding this one.
     */
    public RegularTimePeriod previous() {
        
        Second result = null;
        if (this.second != FIRST_SECOND_IN_MINUTE) {
            result = new Second(this.second - 1, this.minute);
        }
        else {
            Minute previous = (Minute) this.minute.previous();
            if (previous != null) {
                result = new Second(LAST_SECOND_IN_MINUTE, previous);
            }
        }
        return result;
        
    }

    /**
     * Returns the second following this one.
     *
     * @return The second following this one.
     */
    public RegularTimePeriod next() {
        
        Second result = null;
        if (this.second != LAST_SECOND_IN_MINUTE) {
            result = new Second(this.second + 1, this.minute);
        }
        else {
            Minute next = (Minute) this.minute.next();
            if (next != null) {
                result = new Second(FIRST_SECOND_IN_MINUTE, next);
            }
        }
        return result;

    }

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

    /**
     * Returns the first millisecond of the minute.
     *
     * @param calendar  the calendar/timezone.
     *
     * @return The first millisecond.
     */
    public long getFirstMillisecond(Calendar calendar) {
        return this.minute.getFirstMillisecond(calendar) + this.second * 1000L;
    }

    /**
     * Returns the last millisecond of the second.
     *
     * @param calendar  the calendar/timezone.
     *
     * @return The last millisecond.
     */
    public long getLastMillisecond(Calendar calendar) {
        return this.minute.getFirstMillisecond(calendar) 
            + this.second * 1000L + 999L;
    }

    /**
     * Tests the equality of this object against an arbitrary Object.
     * <P>
     * This method will return true ONLY if the object is a Second object
     * representing the same second as this instance.
     *
     * @param obj  the object to compare.
     *
     * @return <code>true</code> if second and minute of this and the object 
     *         are the same.
     */
    public boolean equals(Object obj) {
        if (obj instanceof Second) {
            Second s = (Second) obj;
            return ((this.second == s.getSecond()) 
                    && (this.minute.equals(s.getMinute())));
        }
        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;
        result = 37 * result + this.second;
        result = 37 * result + this.minute.hashCode();
        return result;
    }

    /**
     * Returns an integer indicating the order of this Second 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 Second object
        // -------------------------------------------
        if (o1 instanceof Second) {
            Second s = (Second) o1;
            result = this.minute.compareTo(s.minute);
            if (result == 0) {
                result = this.second - s.second;
            }
        }

        // 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 new instance by parsing a string.  The string is assumed to
     * be in the format "YYYY-MM-DD HH:MM:SS", perhaps with leading or trailing
     * whitespace.
     *
     * @param s  the string to parse.
     *
     * @return The second, or <code>null</code> if the string is not parseable.
     */
    public static Second parseSecond(String s) {

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

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

            int l = hmsstr.length();
            String hourstr = hmsstr.substring(0, Math.min(2, l));
            String minstr = hmsstr.substring(Math.min(3, l), Math.min(5, l));
            String secstr = hmsstr.substring(Math.min(6, l), Math.min(8, l));
            int hour = Integer.parseInt(hourstr);

            if ((hour >= 0) && (hour <= 23)) {

                int minute = Integer.parseInt(minstr);
                if ((minute >= 0) && (minute <= 59)) {

                    Minute m = new Minute(minute, new Hour(hour, day));
                    int second = Integer.parseInt(secstr);
                    if ((second >= 0) && (second <= 59)) {
                        result = new Second(second, m);
                    }
                }
            }
        }

        return result;

    }

}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91玉足脚交白嫩脚丫在线播放| 欧美一区二区三区在| 欧美视频完全免费看| 精品国产123| 亚洲综合在线观看视频| 精品一区二区在线视频| 欧美在线观看一二区| 国产欧美精品日韩区二区麻豆天美| 午夜精品久久一牛影视| 99精品视频一区二区三区| 久久综合久久鬼色| 石原莉奈在线亚洲二区| 91久久精品午夜一区二区| 国产精品视频yy9299一区| 九色综合狠狠综合久久| 在线播放中文一区| 亚洲综合在线电影| 日本电影欧美片| 亚洲欧美视频在线观看| 成人精品gif动图一区| 久久在线免费观看| 在线视频国产一区| 国产精品久久看| 成人性色生活片| 久久久久久久综合| 国产一二三精品| 久久精品亚洲精品国产欧美kt∨| 久久99在线观看| 精品国产免费一区二区三区香蕉| 免费精品视频最新在线| 欧美人伦禁忌dvd放荡欲情| 亚洲精品老司机| 在线免费观看一区| 夜夜嗨av一区二区三区中文字幕| 99国产精品久| 亚洲曰韩产成在线| 欧美日韩一区在线观看| 五月婷婷久久丁香| 51午夜精品国产| 麻豆国产一区二区| 久久久一区二区| 99麻豆久久久国产精品免费优播| 国产精品福利av| 欧美色图一区二区三区| 肉色丝袜一区二区| 精品欧美乱码久久久久久1区2区| 老司机精品视频一区二区三区| 欧美变态口味重另类| 国产一区二区三区不卡在线观看| 久久久久综合网| jlzzjlzz亚洲女人18| 亚洲资源中文字幕| 日韩精品在线看片z| 国产成人免费视频一区| 国产91综合网| 国产精品久久久久影院亚瑟| 色狠狠一区二区三区香蕉| 日日夜夜一区二区| 国产无一区二区| 欧美性猛交xxxxxxxx| 免费观看成人鲁鲁鲁鲁鲁视频| 精品福利在线导航| 色999日韩国产欧美一区二区| 丝袜亚洲精品中文字幕一区| 26uuu色噜噜精品一区| 成人aaaa免费全部观看| 日韩综合小视频| 国产三级欧美三级| 欧美视频一区二区三区四区 | 精品久久久久av影院| 高清日韩电视剧大全免费| 一区二区在线观看免费视频播放| 这里只有精品视频在线观看| 高清久久久久久| 美女视频黄a大片欧美| 国产精品国产三级国产aⅴ入口 | 日韩高清在线一区| 一区在线中文字幕| 精品久久国产老人久久综合| 色系网站成人免费| 国产美女主播视频一区| 五月天精品一区二区三区| 国产欧美精品国产国产专区| 欧美日韩国产高清一区二区三区| 国产69精品久久久久毛片 | 日韩视频在线永久播放| a4yy欧美一区二区三区| 国产一区二区中文字幕| 精品亚洲成a人| 99精品偷自拍| 亚洲欧美激情视频在线观看一区二区三区| 国产尤物一区二区在线 | 久久精品国产99国产| 欧美一区二区成人6969| 99久久久精品免费观看国产蜜| 亚洲欧美乱综合| 成人av网站在线观看| 久久精品国产成人一区二区三区| 亚洲尤物在线视频观看| 中文字幕欧美一区| 中文字幕日韩av资源站| 国产日产欧美一区二区视频| 久久麻豆一区二区| 日韩欧美成人激情| 日韩美女在线视频| 337p亚洲精品色噜噜| 欧美日韩国产电影| 欧美日韩成人高清| 欧美日本一道本| 欧美日高清视频| 欧美日韩亚洲综合在线 欧美亚洲特黄一级| 91日韩精品一区| 在线视频观看一区| 欧美视频一区二区三区在线观看| 欧美在线视频全部完| 欧美日韩在线不卡| 91精品国产91综合久久蜜臀| 91精品国产高清一区二区三区| 69久久夜色精品国产69蝌蚪网| 欧美日韩一区视频| 欧美一二三四区在线| 337p粉嫩大胆色噜噜噜噜亚洲 | 欧美婷婷六月丁香综合色| 色婷婷综合五月| 欧美日韩色综合| 日韩一区二区高清| 久久久久久黄色| 欧美极品aⅴ影院| 亚洲丝袜美腿综合| 亚洲va韩国va欧美va| 青青草国产精品97视觉盛宴| 九九久久精品视频| 成人动漫av在线| 欧美日韩在线一区二区| 精品美女一区二区| 亚洲人妖av一区二区| 五月天视频一区| 国产高清久久久| 欧美制服丝袜第一页| 欧美大片在线观看| 中文字幕中文在线不卡住| 亚洲国产另类av| 国产99久久久国产精品潘金网站| 91国在线观看| 精品粉嫩超白一线天av| 日韩美女久久久| 久久国产尿小便嘘嘘| 一本色道久久综合亚洲91| 欧美一级电影网站| 亚洲视频综合在线| 蜜桃精品视频在线| 久久人人超碰精品| 亚洲色图制服诱惑| 蜜桃视频在线观看一区| 粉嫩一区二区三区性色av| 欧美一a一片一级一片| 久久在线观看免费| 亚洲成年人网站在线观看| 国产高清无密码一区二区三区| 欧美亚洲禁片免费| 欧美国产成人在线| 日韩二区在线观看| 色综合久久综合网97色综合| 亚洲精品一区二区三区99| 亚洲综合色视频| www.亚洲免费av| 久久综合一区二区| 日本中文在线一区| 在线亚洲一区二区| 国产精品视频看| 国产综合久久久久久鬼色 | 天堂va蜜桃一区二区三区漫画版| 国产成+人+日韩+欧美+亚洲| 欧美丰满一区二区免费视频| 亚洲视频一二三| 国产v日产∨综合v精品视频| 91精品国产手机| 亚洲一区二区视频| 91网上在线视频| 亚洲图片激情小说| 国产成人日日夜夜| 欧美精品一区在线观看| 美女网站一区二区| 在线不卡一区二区| 日韩专区一卡二卡| 欧美福利视频一区| 午夜私人影院久久久久| 欧美在线啊v一区| 亚洲精品免费看| 色婷婷狠狠综合| 亚洲日本在线看| 91小宝寻花一区二区三区| 综合av第一页| 在线中文字幕一区二区| 亚洲精品va在线观看| 色婷婷狠狠综合| 亚洲午夜免费福利视频| 欧美日韩国产在线播放网站| 亚洲第一福利一区| 在线不卡欧美精品一区二区三区|