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

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

?? defaultwinddataset.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.]
 *
 * -----------------------
 * DefaultWindDataset.java
 * -----------------------
 * (C) Copyright 2001-2005, by Achilleus Mantzios and Contributors.
 *
 * Original Author:  Achilleus Mantzios;
 * Contributor(s):   David Gilbert (for Object Refinery Limited);
 *
 * $Id: DefaultWindDataset.java,v 1.5.2.1 2005/10/25 21:36:51 mungady Exp $
 *
 * Changes
 * -------
 * 06-Feb-2002 : Version 1, based on code contributed by Achilleus 
 *               Mantzios (DG);
 * 05-May-2004 : Now extends AbstractXYDataset (DG);
 * 15-Jul-2004 : Switched getX() with getXValue() and getY() with 
 *               getYValue() (DG);
 *
 */

package org.jfree.data.xy;

import java.util.Arrays;
import java.util.Collections;
import java.util.Date;
import java.util.List;

/**
 * A default implementation of the {@link WindDataset} interface.
 *
 * @author Achilleus Mantzios
 */
public class DefaultWindDataset extends AbstractXYDataset 
                                implements WindDataset {

    /** The keys for the series. */
    private List seriesKeys;

    /** Storage for the series data. */
    private List allSeriesData;

    /**
     * Constructs a new, empty, dataset.
     */
    public DefaultWindDataset() {
        this.seriesKeys = new java.util.ArrayList();
        this.allSeriesData = new java.util.ArrayList();
    }

    /**
     * Constructs a dataset based on the specified data array.
     *
     * @param data  the data.
     */
    public DefaultWindDataset(Object[][][] data) {
        this(seriesNameListFromDataArray(data), data);
    }

    /**
     * Constructs a dataset based on the specified data array.
     *
     * @param seriesNames    the names of the series.
     * @param data  the wind data.
     */
    public DefaultWindDataset(String[] seriesNames, Object[][][] data) {
        this(Arrays.asList(seriesNames), data);
    }

    /**
     * Constructs a dataset based on the specified data array.  The array
     * can contain multiple series, each series can contain multiple items,
     * and each item is as follows:
     * <ul>
     * <li><code>data[series][item][0]</code> - the date (either a 
     *   <code>Date</code> or a <code>Number</code> that is the milliseconds 
     *   since 1-Jan-1970);</li>
     * <li><code>data[series][item][1]</code> - the wind direction (1 - 12, 
     *   like the numbers on a clock face);</li>
     * <li><code>data[series][item][2]</code> - the wind force (1 - 12 on the
     *   Beaufort scale)</li>
     * </ul>
     * 
     * @param seriesKeys  the names of the series.
     * @param data  the wind dataset.
     */
    public DefaultWindDataset(List seriesKeys, Object[][][] data) {

        this.seriesKeys = seriesKeys;
        int seriesCount = data.length;
        this.allSeriesData = new java.util.ArrayList(seriesCount);

        for (int seriesIndex = 0; seriesIndex < seriesCount; seriesIndex++) {
            List oneSeriesData = new java.util.ArrayList();
            int maxItemCount = data[seriesIndex].length;
            for (int itemIndex = 0; itemIndex < maxItemCount; itemIndex++) {
                Object xObject = data[seriesIndex][itemIndex][0];
                if (xObject != null) {
                    Number xNumber;
                    if (xObject instanceof Number) {
                        xNumber = (Number) xObject;
                    }
                    else {
                        if (xObject instanceof Date) {
                            Date xDate = (Date) xObject;
                            xNumber = new Long(xDate.getTime());
                        }
                        else {
                            xNumber = new Integer(0);
                        }
                    }
                    Number windDir = (Number) data[seriesIndex][itemIndex][1];
                    Number windForce = (Number) data[seriesIndex][itemIndex][2];
                    oneSeriesData.add(
                        new WindDataItem(xNumber, windDir, windForce)
                    );
                }
            }
            Collections.sort(oneSeriesData);
            this.allSeriesData.add(seriesIndex, oneSeriesData);
        }

    }

    /**
     * Returns the number of series in the dataset.
     * 
     * @return The series count.
     */
    public int getSeriesCount() {
        return this.allSeriesData.size();
    }

    /**
     * Returns the number of items in a series.
     * 
     * @param series  the series (zero-based index).
     * 
     * @return The item count.
     */
    public int getItemCount(int series) {
        List oneSeriesData = (List) this.allSeriesData.get(series);
        return oneSeriesData.size();
    }

    /**
     * Returns the key for a series.
     * 
     * @param series  the series (zero-based index).
     * 
     * @return The series key.
     */
    public Comparable getSeriesKey(int series) {
        return this.seriesKeys.get(series).toString();
    }

    /**
     * Returns the x-value for one item within a series.  This should represent
     * a point in time, encoded as milliseconds in the same way as
     * java.util.Date.
     *
     * @param series  the series (zero-based index).
     * @param item  the item (zero-based index).
     * 
     * @return The x-value for the item within the series.
     */
    public Number getX(int series, int item) {
        List oneSeriesData = (List) this.allSeriesData.get(series);
        WindDataItem windItem = (WindDataItem) oneSeriesData.get(item);
        return windItem.getX();
    }

    /**
     * Returns the y-value for one item within a series.  This maps to the
     * {@link #getWindForce(int, int)} method and is implemented because 
     * <code>WindDataset</code> is an extension of {@link XYDataset}.
     *
     * @param series  the series (zero-based index).
     * @param item  the item (zero-based index).
     * 
     * @return The y-value for the item within the series.
     */
    public Number getY(int series, int item) {
        return getWindForce(series, item);
    }

    /**
     * Returns the wind direction for one item within a series.  This is a
     * number between 0 and 12, like the numbers on a clock face.
     * 
     * @param series  the series (zero-based index).
     * @param item  the item (zero-based index).
     * 
     * @return The wind direction for the item within the series.
     */
    public Number getWindDirection(int series, int item) {
        List oneSeriesData = (List) this.allSeriesData.get(series);
        WindDataItem windItem = (WindDataItem) oneSeriesData.get(item);
        return windItem.getWindDirection();
    }

    /**
     * Returns the wind force for one item within a series.  This is a number
     * between 0 and 12, as defined by the Beaufort scale.
     * 
     * @param series  the series (zero-based index).
     * @param item  the item (zero-based index).
     * 
     * @return The wind force for the item within the series.
     */
    public Number getWindForce(int series, int item) {
        List oneSeriesData = (List) this.allSeriesData.get(series);
        WindDataItem windItem = (WindDataItem) oneSeriesData.get(item);
        return windItem.getWindForce();
    }

    /**
     * Utility method for automatically generating series names.
     * @param data  the wind dataset.
     *
     * @return An array of <i>Series N</i> with N = { 1 .. data.length }.
     */
    public static List seriesNameListFromDataArray(Object[][] data) {

        int seriesCount = data.length;
        List seriesNameList = new java.util.ArrayList(seriesCount);
        for (int i = 0; i < seriesCount; i++) {
            seriesNameList.add("Series " + (i + 1));
        }
        return seriesNameList;

    }

}

/**
 * A wind data item.
 *
 * @author Achilleus Mantzios
 */
class WindDataItem implements Comparable {

    /** The x-value. */
    private Number x;

    /** The wind direction. */
    private Number windDir;

    /** The wind force. */
    private Number windForce;

    /**
     * Creates a new wind data item.
     *
     * @param x  the x-value.
     * @param windDir  the direction.
     * @param windForce  the force.
     */
    public WindDataItem(Number x, Number windDir, Number windForce) {
        this.x = x;
        this.windDir = windDir;
        this.windForce = windForce;
    }

    /**
     * Returns the x-value.
     *
     * @return The x-value.
     */
    public Number getX() {
        return this.x;
    }

    /**
     * Returns the wind direction.
     *
     * @return The wind direction.
     */
    public Number getWindDirection() {
        return this.windDir;
    }

    /**
     * Returns the wind force.
     *
     * @return The wind force.
     */
    public Number getWindForce() {
        return this.windForce;
    }

    /**
     * Compares this item to another object.
     *
     * @param object  the other object.
     *
     * @return An int that indicates the relative comparison.
     */
    public int compareTo(Object object) {
        if (object instanceof WindDataItem) {
            WindDataItem item = (WindDataItem) object;
            if (this.x.doubleValue() > item.x.doubleValue()) {
                return 1;
            }
            else if (this.x.equals(item.x)) {
                return 0;
            }
            else {
                return -1;
            }
        }
        else {
            throw new ClassCastException("WindDataItem.compareTo(error)");
        }
    }

}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美在线你懂得| 91网站在线播放| 亚洲精品一线二线三线| 91丨九色丨国产丨porny| 免费黄网站欧美| 樱花影视一区二区| 日本一区二区三区视频视频| 日韩三级精品电影久久久 | 日韩一卡二卡三卡国产欧美| 成人黄色小视频| 久久99国产精品久久| 性做久久久久久免费观看| 国产精品久久久99| 欧美变态口味重另类| 欧美理论电影在线| 欧美亚洲综合在线| 91社区在线播放| 成人av网站在线| 风间由美一区二区av101| 在线日韩国产精品| 91在线视频在线| 国产宾馆实践打屁股91| 九色|91porny| 免费在线观看成人| 国产精品亚洲一区二区三区妖精| 亚洲国产精品一区二区久久恐怖片 | 欧美性猛交xxxxxx富婆| 99久久国产综合精品麻豆| 国产精品一区二区免费不卡 | 7777精品伊人久久久大香线蕉完整版| 97国产精品videossex| 不卡的电影网站| 99视频在线观看一区三区| 国产a视频精品免费观看| 国产精品99久| 国产成人免费视频一区| 国产高清精品网站| 粉嫩13p一区二区三区| 成人一区在线观看| 成人听书哪个软件好| 成人性色生活片| 99国产欧美久久久精品| 91免费看片在线观看| 在线观看www91| 国产三级一区二区| 久久久久99精品国产片| 国产欧美一区在线| 国产精品免费丝袜| 中文字幕一区三区| 一区二区三区欧美日韩| 亚洲一区视频在线| 99久久99久久精品国产片果冻| jvid福利写真一区二区三区| 99久久免费视频.com| 一本大道av一区二区在线播放| 91蜜桃在线观看| 91国内精品野花午夜精品| 欧美日韩国产123区| 精品国产三级电影在线观看| 国产欧美一区二区精品久导航| 国产精品久久久久久久久久免费看| 亚洲欧美另类图片小说| 五月天久久比比资源色| 麻豆91精品91久久久的内涵| 国产精品自拍三区| 91在线观看污| 欧美精品在线一区二区| 日韩欧美亚洲另类制服综合在线 | 亚洲美女少妇撒尿| 午夜不卡在线视频| 国产精品一区二区黑丝| 色婷婷激情久久| 欧美videos中文字幕| 国产精品久久久久久亚洲毛片| 亚洲美女电影在线| 免费高清视频精品| 成人av网站在线观看免费| 欧美日韩一区高清| 亚洲国产精品av| 日韩和欧美的一区| 大美女一区二区三区| 欧美日韩激情在线| 国产精品美女一区二区三区| 亚洲成人精品一区二区| 国产.精品.日韩.另类.中文.在线.播放| 色网站国产精品| 久久久久久麻豆| 亚洲国产毛片aaaaa无费看 | 岛国精品在线播放| 欧美精品一级二级三级| 亚洲国产激情av| 免费精品视频在线| 91极品视觉盛宴| 国产日韩av一区| 日韩av中文字幕一区二区三区| 不卡视频一二三| 欧美大尺度电影在线| 亚洲一区中文日韩| 成人高清视频在线| 亚洲成人精品影院| av欧美精品.com| 久久午夜电影网| 青青国产91久久久久久| 91久久免费观看| 中文字幕欧美激情| 精品一区精品二区高清| 欧美美女直播网站| 亚洲欧美电影一区二区| 懂色av噜噜一区二区三区av| 欧美变态口味重另类| 午夜精品在线看| 一本一道久久a久久精品综合蜜臀 一本一道综合狠狠老 | 不卡欧美aaaaa| 久久精品一区二区三区av| 爽好久久久欧美精品| 欧美综合久久久| 亚洲柠檬福利资源导航| 丁香六月综合激情| 国产日韩欧美精品一区| 国产乱一区二区| 欧美成人女星排名| 久久69国产一区二区蜜臀| 日韩午夜小视频| 日本不卡的三区四区五区| 欧美二区三区91| 肉肉av福利一精品导航| 欧美日韩国产高清一区二区| 亚洲动漫第一页| 欧美日韩中文精品| 亚洲成人免费影院| 欧美丰满一区二区免费视频| 亚洲最大色网站| 欧美午夜精品久久久| 亚洲专区一二三| 欧美美女激情18p| 午夜精品一区在线观看| 欧美高清精品3d| 免费一区二区视频| 久久亚洲一级片| 国产成a人亚洲| 国产精品国产三级国产aⅴ中文| gogo大胆日本视频一区| **网站欧美大片在线观看| 色婷婷精品久久二区二区蜜臀av| 亚洲九九爱视频| 欧美日韩一级片在线观看| 日本欧美一区二区三区乱码| 日韩视频在线永久播放| 国产精品综合二区| 综合av第一页| 欧美日韩国产片| 狠狠久久亚洲欧美| 国产精品免费视频观看| 欧美中文一区二区三区| 日韩主播视频在线| 久久蜜桃av一区二区天堂| 福利电影一区二区| 一区二区三区四区在线免费观看 | 国产精品免费av| 在线欧美日韩国产| 免费观看在线综合| 国产精品热久久久久夜色精品三区| 91在线观看免费视频| 日韩高清欧美激情| 日本一区二区三区国色天香 | 中文字幕一区二区不卡| 欧美日韩国产免费| 欧美电影在线免费观看| 国内精品写真在线观看| 亚洲欧美激情小说另类| 欧美一二三四区在线| 成人免费视频一区| 爽爽淫人综合网网站| 欧美国产欧美综合| 欧美性欧美巨大黑白大战| 麻豆国产精品视频| 亚洲三级在线看| 精品卡一卡二卡三卡四在线| 一本到高清视频免费精品| 麻豆成人免费电影| 亚洲欧美另类综合偷拍| 久久综合久久99| 欧美亚洲另类激情小说| 国产福利一区二区三区在线视频| 亚洲制服丝袜一区| 国产亚洲女人久久久久毛片| 欧美日本一区二区三区四区| 风间由美一区二区三区在线观看 | 免费成人结看片| 亚洲天堂2014| 久久欧美一区二区| 欧美精品v国产精品v日韩精品| 成人18视频在线播放| 另类小说图片综合网| 夜色激情一区二区| 国产精品久久久一本精品| 欧美哺乳videos| 欧美日韩国产区一| 色婷婷av久久久久久久| 国产成人av电影在线观看|