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

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

?? segmentedtimelinetests.java

?? Web圖形化的Java庫
?? JAVA
?? 第 1 頁 / 共 4 頁
字號:
/* ======================================
 * JFreeChart : a free Java chart library
 * ======================================
 *
 * Project Info:  http://www.jfree.org/jfreechart/index.html
 * Project Lead:  David Gilbert (david.gilbert@object-refinery.com);
 *
 * (C) Copyright 2000-2003, by Object Refinery Limited and Contributors.
 *
 * 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., 59 Temple Place, Suite 330,
 * Boston, MA 02111-1307, USA.
 *
 * ----------------------------
 * SegmentedTimelineTests.java
 * ----------------------------
 * (C) Copyright 2003 by Bill Kelemen and Contributors.
 *
 * Original Author:  Bill Kelemen;
 * Contributor(s):   ;
 *
 * $Id: SegmentedTimelineTests.java,v 1.8 2003/09/11 07:42:12 mungady Exp $
 *
 * Changes
 * -------
 * 24-May-2003 : Version 1 (BK);
 *
 */

package org.jfree.chart.axis.junit;

import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.ObjectInput;
import java.io.ObjectInputStream;
import java.io.ObjectOutput;
import java.io.ObjectOutputStream;
import java.text.Format;
import java.text.NumberFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.GregorianCalendar;
import java.util.Iterator;

import junit.framework.Test;
import junit.framework.TestCase;
import junit.framework.TestSuite;

import org.jfree.chart.axis.SegmentedTimeline;

/**
 * JUnit Tests for the {@link SegmentedTimeline} class.
 *
 * @author Bill Kelemen
 */
public class SegmentedTimelineTests extends TestCase {

    /** These constants control test cycles in the validateXXXX methods. */
    private static final int TEST_CYCLE_START = 0;

    /** These constants control test cycles in the validateXXXX methods. */
    private static final int TEST_CYCLE_END   = 1000;

    /** These constants control test cycles in the validateXXXX methods. */
    private static final int TEST_CYCLE_INC   = 55;

    /** Number of ms in five years */
    private static final long FIVE_YEARS = 5 * 365 * SegmentedTimeline.DAY_SEGMENT_SIZE;

    /** Number format object for ms tests. */
    private static final NumberFormat NUMBER_FORMAT = NumberFormat.getNumberInstance();

    /** Date format object for Monday through Friday tests. */
    private static final SimpleDateFormat DATE_FORMAT;

    /** Date format object 9:00 AM to 4:00 PM tests. */
    private static final SimpleDateFormat DATE_TIME_FORMAT;

    /** Some ms exceptions for ms testing. */
    private static final String[] MS_EXCEPTIONS =
        {"0", "2", "4", "10", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24",
         "47", "58", "100", "101"};

     /** Some ms4 exceptions for ms testing. */
     private static final String[] MS2_BASE_TIMELINE_EXCEPTIONS =
         {"0", "8", "16", "24", "32", "40", "48", "56", "64", "72", "80", "88", "96", "104",
          "112", "120", "128", "136"};

    /** US non-trading dates in 2000 through 2002 to test exceptions. */
    private static final String[] US_HOLIDAYS =
        {"2000-01-17", "2000-02-21", "2000-04-21", "2000-05-29", "2000-07-04",
         "2000-09-04", "2000-11-23", "2000-12-25", "2001-01-01", "2001-01-15",
         "2001-02-19", "2001-04-13", "2001-05-28", "2001-07-04", "2001-09-03",
         "2001-09-11", "2001-09-12", "2001-09-13", "2001-09-14", "2001-11-22",
         "2001-12-25", "2002-01-01", "2002-01-21", "2002-02-18", "2002-03-29",
         "2002-05-27", "2002-07-04", "2002-09-02", "2002-11-28", "2002-12-25"};

     /** Some test exceptions for the fifteen min timeline. */
     private static final String[] FIFTEEN_MIN_EXCEPTIONS =
         {"2000-01-10 09:00:00", "2000-01-10 09:15:00", "2000-01-10 09:30:00",
          "2000-01-10 09:45:00", "2000-01-10 10:00:00", "2000-01-10 10:15:00",
          "2000-02-15 09:00:00", "2000-02-15 09:15:00", "2000-02-15 09:30:00",
          "2000-02-15 09:45:00", "2000-02-15 10:00:00", "2000-02-15 10:15:00",
          "2000-02-16 11:00:00", "2000-02-16 11:15:00", "2000-02-16 11:30:00",
          "2000-02-16 11:45:00", "2000-02-16 12:00:00", "2000-02-16 12:15:00",
          "2000-02-16 12:30:00", "2000-02-16 12:45:00", "2000-02-16 01:00:00",
          "2000-02-16 01:15:00", "2000-02-16 01:30:00", "2000-02-16 01:45:00",
          "2000-05-17 11:45:00", "2000-05-17 12:00:00", "2000-05-17 12:15:00",
          "2000-05-17 12:30:00", "2000-05-17 12:45:00", "2000-05-17 01:00:00",
          "2000-05-17 01:15:00", "2000-05-17 01:30:00", "2000-05-17 01:45:00",
          "2000-05-17 02:00:00", "2000-05-17 02:15:00", "2000-05-17 02:30:00",
          "2000-05-17 02:45:00", "2000-05-17 03:00:00", "2000-05-17 03:15:00",
          "2000-05-17 03:30:00", "2000-05-17 03:45:00", "2000-05-17 04:00:00"};

    /** Our 1-ms test timeline using 5 included and 2 excluded segments. */
    private SegmentedTimeline msTimeline;

    /** Our 1-ms test timeline (with baseTimeline) using 2 included and 2 excluded segments. */
    private SegmentedTimeline ms2Timeline;

    /** Our 4-ms test base timeline for ms2Timeline using 1 included and 1 excluded segments */
    private SegmentedTimeline ms2BaseTimeline;

    /** Our test Monday through Friday test timeline. */
    private SegmentedTimeline mondayFridayTimeline;

    /** Our 9:00 AM to 4:00 PM fifteen minute timeline. */
    private SegmentedTimeline fifteenMinTimeline;

    /** ms from 1970-01-01 to first monday after 2001-01-01. */
    private Calendar monday;

    /** ms from 1970-01-01 to 9 am first monday after 2001-01-01. */
    private Calendar monday9am;

    /** Static initialization block. */
    static {
        DATE_FORMAT = new SimpleDateFormat("yyyy-MM-dd");
        DATE_FORMAT.setTimeZone(SegmentedTimeline.NO_DST_TIME_ZONE);

        DATE_TIME_FORMAT = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        DATE_TIME_FORMAT.setTimeZone(SegmentedTimeline.NO_DST_TIME_ZONE);
    }

    /**
     * Returns the tests as a test suite.
     *
     * @return the test suite.
     */
    public static Test suite() {
        return new TestSuite(SegmentedTimelineTests.class);
    }

    /**
     * Constructs a new set of tests.
     *
     * @param  name the name of the tests.
     */
    public SegmentedTimelineTests(String name) {
        super(name);
    }

    /**
     * Sets up the fixture, for example, open a network connection.
     * This method is called before a test is executed.
     * 
     * @throws Exception if there is a problem.
     */
    protected void setUp() throws Exception {
        // setup our test timelines
        //
        // Legend for comments below:
        // <spaces> = Segments included in the final timeline
        // EE       = Excluded segments via timeline rules
        // xx       = Exception segments inherited from base timeline exclusions

        // 1-ms test timeline using 5 included and 2 excluded segments.
        //
        // timeline start time = 0
        //   |
        //   v
        //   0  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19 20 21 ...
        // +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+...
        // |  |  |  |  |  |EE|EE|  |  |  |  |  |EE|EE|  |  |  |  |  |  |EE|EE|    <-- msTimeline
        // +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+...
        //  \_________  ________/            \_/
        //            \/                      |
        //       segment group         segment size = 1 ms
        //
        msTimeline = new SegmentedTimeline(1, 5, 2);
        msTimeline.setStartTime(0);

        // 4-ms test base timeline for ms2Timeline using 1 included and 1 excluded segments
        //
        // timeline start time = 0
        //   |
        //   v
        //   0  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19 ...
        // +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+...
        // |  |  |  |  |EE|EE|EE|EE|  |  |  |  |EE|EE|EE|EE|  |  |  |  |    <-- ms2BaseTimeline
        // +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+...
        //  \__________  _________/            \____  _____/
        //             \/                           \/
        //        segment group              segment size = 4 ms
        //
        ms2BaseTimeline = new SegmentedTimeline(4, 1, 1);
        ms2BaseTimeline.setStartTime(0);

        // 1-ms test timeline (with a baseTimeline) using 2 included and 2 excluded segments
        // centered inside each base segment
        //
        // The ms2Timeline without a base would look like this:
        //
        //    timeline start time = 1
        //      |
        //      v
        //   0  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19 ...
        // +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+...
        // |EE|  |  |EE|EE|  |  |EE|EE|  |  |EE|EE|  |  |EE|EE|  |  |EE|    <-- ms2Timeline
        // +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+...
        //    \____  _____/            \_/
        //         \/                   |
        //    segment group      segment size = 1 ms
        //
        // With the base timeline some originally included segments are now removed (see "xx"
        // below):
        //
        //   0  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19 ...
        // +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+...
        // |EE|  |  |EE|EE|xx|xx|EE|EE|  |  |EE|EE|xx|xx|EE|EE|  |  |EE|    <-- ms2Timeline
        // +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+...
        // |  |  |  |  |EE|EE|EE|EE|  |  |  |  |EE|EE|EE|EE|  |  |  |  |    <-- ms2BaseTimeline
        // +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+...
        //
        ms2Timeline = new SegmentedTimeline(1, 2, 2);
        ms2Timeline.setStartTime(1);
        ms2Timeline.setBaseTimeline(ms2BaseTimeline);

        // test monday though friday timeline
        mondayFridayTimeline = SegmentedTimeline.newMondayThroughFridayTimeline();

        // test 9am-4pm Monday through Friday timeline
        fifteenMinTimeline = SegmentedTimeline.newFifteenMinuteTimeline();

        // find first Monday after 2001-01-01
        Calendar cal = new GregorianCalendar(SegmentedTimeline.NO_DST_TIME_ZONE);
        cal.set(2001, 0, 1, 0, 0, 0);
        cal.set(Calendar.MILLISECOND, 0);
        while (cal.get(Calendar.DAY_OF_WEEK) != Calendar.MONDAY) {
            cal.add(Calendar.DATE, 1);
        }
        monday = (Calendar) cal.clone();

        // calculate 9am on the first Monday after 2001-01-01
        cal.add(Calendar.HOUR, 9);
        monday9am = (Calendar) cal.clone();
    }

    /**
     * Tears down the fixture, for example, close a network connection.
     * This method is called after a test is executed.
     * 
     * @throws Exception if there is a problem.
     */
    protected void tearDown() throws Exception {
    }

    //////////////////////////////////////////////////////////////////////////
    // test construction process
    //////////////////////////////////////////////////////////////////////////

    /**
     * Tests that the new method that created the msTimeline segmented
     * timeline did so correctly.
     */
    public void testMsSegmentedTimeline() {
        // verify attributes set during object construction

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产日韩欧美精品综合| 日韩亚洲欧美在线| 国内精品视频一区二区三区八戒| 亚洲综合久久久久| 亚洲一区二区精品3399| 亚洲国产综合视频在线观看| 亚洲宅男天堂在线观看无病毒| 亚洲高清一区二区三区| 午夜精品爽啪视频| 久国产精品韩国三级视频| 国内精品嫩模私拍在线| 成人免费毛片app| 91小视频免费看| 91黄视频在线观看| 欧美一级生活片| 久久久久亚洲蜜桃| 亚洲日本丝袜连裤袜办公室| 亚洲电影激情视频网站| 美女诱惑一区二区| 国产精品亚洲人在线观看| jvid福利写真一区二区三区| 欧美性xxxxxx少妇| 精品国产一区久久| 中文字幕在线一区免费| 亚洲成人精品一区| 激情综合色播激情啊| 99在线热播精品免费| 欧美日韩一区二区三区免费看| 日韩精品在线一区| 日韩理论片一区二区| 日韩精品一区第一页| 成人精品免费视频| 欧美精品在线一区二区三区| 国产精品久久久久一区| 亚洲国产精品麻豆| 国产一区二区三区在线看麻豆| 91在线无精精品入口| 91精品欧美一区二区三区综合在| 久久久亚洲精品一区二区三区| 一区二区三区丝袜| 国产麻豆视频精品| 欧美精品国产精品| 中文字幕一区二区三区乱码在线 | 色菇凉天天综合网| 69精品人人人人| 亚洲视频资源在线| 国产伦理精品不卡| 91精品国产一区二区三区香蕉 | 在线免费观看日韩欧美| 久久久精品一品道一区| 日韩国产精品久久| 色综合中文字幕国产| 日韩一区二区三区三四区视频在线观看 | 国产.欧美.日韩| 欧美日韩国产a| 国产精品灌醉下药二区| 另类的小说在线视频另类成人小视频在线 | 亚洲色图另类专区| 国产69精品久久99不卡| 91麻豆精品国产无毒不卡在线观看| 国产精品国产三级国产aⅴ无密码| 精品在线播放免费| 欧美人xxxx| 亚洲国产精品视频| 欧美色图天堂网| 亚洲欧美日韩国产另类专区| 成人晚上爱看视频| 国产免费成人在线视频| 国产成人啪免费观看软件| 精品国产一区二区三区四区四| 日本不卡123| 欧美一级理论片| 蜜臀久久久久久久| 日韩欧美国产小视频| 老司机精品视频导航| 日韩精品一区二| 国产精品原创巨作av| 久久毛片高清国产| 国产福利一区二区三区在线视频| 久久久久久久综合色一本| 国产九九视频一区二区三区| 久久久99精品免费观看不卡| 高清日韩电视剧大全免费| 国产精品乱码人人做人人爱| eeuss鲁一区二区三区| 亚洲欧美日韩成人高清在线一区| 色婷婷一区二区三区四区| 一区二区三区免费在线观看| 欧美日韩视频第一区| 青青青伊人色综合久久| 精品福利一区二区三区| 国产成人精品综合在线观看 | 一级女性全黄久久生活片免费| 日本大香伊一区二区三区| 亚洲国产一区二区在线播放| 日韩一二三四区| 国产激情一区二区三区| 日韩一区欧美小说| 在线91免费看| 国产黄人亚洲片| 亚洲综合清纯丝袜自拍| 日韩欧美一二三| 99v久久综合狠狠综合久久| 亚洲1区2区3区4区| 久久精品夜夜夜夜久久| 欧美亚洲丝袜传媒另类| 精品一区二区三区日韩| 亚洲欧美电影一区二区| 日韩三级高清在线| 99精品一区二区| 毛片不卡一区二区| 亚洲免费观看高清完整版在线观看熊| 欧美性生活久久| 国产福利电影一区二区三区| 亚洲国产另类精品专区| 久久亚洲二区三区| 欧美日韩情趣电影| av一区二区三区在线| 蜜臀久久99精品久久久画质超高清| 国产精品久久久爽爽爽麻豆色哟哟| 欧美精品自拍偷拍动漫精品| 99在线精品观看| 国产麻豆精品一区二区| 日韩激情视频网站| 亚洲一区免费在线观看| 国产精品免费免费| 久久久夜色精品亚洲| 91麻豆精品国产91久久久使用方法 | 国产综合色视频| 亚洲国产成人va在线观看天堂 | 99久久精品国产毛片| 美女一区二区视频| 亚洲成人av资源| 亚洲欧美偷拍卡通变态| 国产精品嫩草影院av蜜臀| 日韩午夜av一区| 欧美日韩国产天堂| 欧美日韩在线播放三区| 91精品福利视频| 色综合天天综合狠狠| 本田岬高潮一区二区三区| 国产盗摄一区二区三区| 国产一区欧美一区| 国产一区二区三区精品视频| 精品一区二区三区在线播放视频 | 国产精品国产三级国产aⅴ原创| 精品蜜桃在线看| 日韩免费福利电影在线观看| 91精品免费观看| 欧美群妇大交群中文字幕| 欧美猛男男办公室激情| 欧美曰成人黄网| 欧美日韩国产欧美日美国产精品| 欧美亚洲综合在线| 91精品在线观看入口| 日韩一区二区在线免费观看| 日韩亚洲欧美成人一区| 日韩精品中午字幕| 国产亚洲成年网址在线观看| 国产色综合久久| 国产精品国产三级国产aⅴ中文| 亚洲欧美视频在线观看视频| 亚洲香肠在线观看| 琪琪久久久久日韩精品| 韩国av一区二区三区四区| 丰满亚洲少妇av| 91麻豆蜜桃一区二区三区| 欧美日韩一区不卡| 精品国产伦一区二区三区免费| 久久久噜噜噜久久人人看 | 欧美三级在线视频| 制服丝袜成人动漫| 久久亚洲精品小早川怜子| 国产精品美女久久久久高潮| 亚洲精品五月天| 奇米四色…亚洲| 成人免费看视频| 欧美浪妇xxxx高跟鞋交| 久久久影视传媒| 艳妇臀荡乳欲伦亚洲一区| 蜜臀久久99精品久久久久宅男| 国产91高潮流白浆在线麻豆 | 欧美高清在线精品一区| 亚洲女同ⅹxx女同tv| 老汉av免费一区二区三区| 91一区二区在线观看| 在线播放91灌醉迷j高跟美女 | 26uuuu精品一区二区| 亚洲免费在线观看视频| 蜜臀av性久久久久蜜臀av麻豆| 成人黄页毛片网站| 欧美一区二区三区视频免费播放| 久久亚洲综合色| 日韩av在线播放中文字幕| 福利电影一区二区三区| 欧美一区二区福利在线| 亚洲自拍都市欧美小说| 高清不卡在线观看| 欧美大片一区二区| 亚洲成人动漫av|