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

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

?? timeseries.java

?? jfreechart1.0.1 jsp繪制圖表的開發包
?? JAVA
?? 第 1 頁 / 共 3 頁
字號:
    public TimeSeries addAndOrUpdate(TimeSeries series) {
        TimeSeries overwritten = new TimeSeries(
            "Overwritten values from: " + getKey(), series.getTimePeriodClass()
        );
        for (int i = 0; i < series.getItemCount(); i++) {
            TimeSeriesDataItem item = series.getDataItem(i);
            TimeSeriesDataItem oldItem = addOrUpdate(
                item.getPeriod(), item.getValue()
            );
            if (oldItem != null) {
                overwritten.add(oldItem);
            }
        }
        return overwritten;
    }

    /**
     * Adds or updates an item in the times series and sends a 
     * {@link org.jfree.data.general.SeriesChangeEvent} to all registered 
     * listeners.
     *
     * @param period  the time period to add/update (<code>null</code> not 
     *                permitted).
     * @param value  the new value.
     *
     * @return A copy of the overwritten data item, or <code>null</code> if no 
     *         item was overwritten.
     */
    public TimeSeriesDataItem addOrUpdate(RegularTimePeriod period, 
                                          double value) {
        return this.addOrUpdate(period, new Double(value));    
    }
    
    /**
     * Adds or updates an item in the times series and sends a 
     * {@link org.jfree.data.general.SeriesChangeEvent} to all registered 
     * listeners.
     *
     * @param period  the time period to add/update (<code>null</code> not 
     *                permitted).
     * @param value  the new value (<code>null</code> permitted).
     *
     * @return A copy of the overwritten data item, or <code>null</code> if no 
     *         item was overwritten.
     */
    public TimeSeriesDataItem addOrUpdate(RegularTimePeriod period, 
                                          Number value) {

        if (period == null) {
            throw new IllegalArgumentException("Null 'period' argument.");   
        }
        TimeSeriesDataItem overwritten = null;

        TimeSeriesDataItem key = new TimeSeriesDataItem(period, value);
        int index = Collections.binarySearch(this.data, key);
        if (index >= 0) {
            TimeSeriesDataItem existing 
                = (TimeSeriesDataItem) this.data.get(index);
            overwritten = (TimeSeriesDataItem) existing.clone();
            existing.setValue(value);
            removeAgedItems(false);  // remove old items if necessary, but
                                     // don't notify anyone, because that
                                     // happens next anyway...
            fireSeriesChanged();
        }
        else {
            this.data.add(-index - 1, new TimeSeriesDataItem(period, value));

            // check if this addition will exceed the maximum item count...
            if (getItemCount() > this.maximumItemCount) {
                this.data.remove(0);
            }

            removeAgedItems(false);  // remove old items if necessary, but
                                     // don't notify anyone, because that
                                     // happens next anyway...
            fireSeriesChanged();
        }
        return overwritten;

    }

    /**
     * Age items in the series.  Ensure that the timespan from the youngest to 
     * the oldest record in the series does not exceed maximumItemAge time 
     * periods.  Oldest items will be removed if required.
     * 
     * @param notify  controls whether or not a {@link SeriesChangeEvent} is 
     *                sent to registered listeners IF any items are removed.
     */
    public void removeAgedItems(boolean notify) {
        // check if there are any values earlier than specified by the history 
        // count...
        if (getItemCount() > 1) {
            long latest = getTimePeriod(getItemCount() - 1).getSerialIndex();
            boolean removed = false;
            while ((latest - getTimePeriod(0).getSerialIndex()) 
                    >= this.maximumItemAge) {
                this.data.remove(0);
                removed = true;
            }
            if (removed && notify) {
                fireSeriesChanged();
            }
        }
    }

    /**
     * Age items in the series.  Ensure that the timespan from the supplied 
     * time to the oldest record in the series does not exceed history count.  
     * oldest items will be removed if required.
     *
     * @param latest  the time to be compared against when aging data.
     * @param notify  controls whether or not a {@link SeriesChangeEvent} is 
     *                sent to registered listeners IF any items are removed.
     */
    public void removeAgedItems(long latest, boolean notify) {
        // check if there are any values earlier than specified by the history 
        // count...
        if (getItemCount() > 1) {
            while ((latest - getTimePeriod(0).getSerialIndex()) 
                    >= this.maximumItemAge) {
                this.data.remove(0);
            }
        }
    }

    /**
     * Removes all data items from the series and sends 
     * a {@link org.jfree.data.general.SeriesChangeEvent}
     * to all registered listeners.
     */
    public void clear() {
        if (this.data.size() > 0) {
            this.data.clear();
            fireSeriesChanged();
        }
    }

    /**
     * Deletes the data item for the given time period and sends 
     * a {@link org.jfree.data.general.SeriesChangeEvent} to all registered 
     * listeners.
     *
     * @param period  the period of the item to delete (<code>null</code> not 
     *                permitted).
     */
    public void delete(RegularTimePeriod period) {
        int index = getIndex(period);
        this.data.remove(index);
        fireSeriesChanged();
    }

    /**
     * Deletes data from start until end index (end inclusive).
     *
     * @param start  the index of the first period to delete.
     * @param end  the index of the last period to delete.
     */
    public void delete(int start, int end) {
        for (int i = 0; i <= (end - start); i++) {
            this.data.remove(start);
        }
        fireSeriesChanged();
    }

    /**
     * Returns a clone of the time series.
     * <P>
     * Notes:
     * <ul>
     *   <li>no need to clone the domain and range descriptions, since String 
     *     object is immutable;</li>
     *   <li>we pass over to the more general method clone(start, end).</li>
     * </ul>
     *
     * @return A clone of the time series.
     * 
     * @throws CloneNotSupportedException not thrown by this class, but 
     *         subclasses may differ.
     */
    public Object clone() throws CloneNotSupportedException {
        Object clone = createCopy(0, getItemCount() - 1);
        return clone;
    }

    /**
     * Creates a new timeseries by copying a subset of the data in this time
     * series.
     *
     * @param start  the index of the first time period to copy.
     * @param end  the index of the last time period to copy.
     *
     * @return A series containing a copy of this times series from start until
     *         end.
     * 
     * @throws CloneNotSupportedException if there is a cloning problem.
     */
    public TimeSeries createCopy(int start, int end) 
        throws CloneNotSupportedException {

        TimeSeries copy = (TimeSeries) super.clone();

        copy.data = new java.util.ArrayList();
        if (this.data.size() > 0) {
            for (int index = start; index <= end; index++) {
                TimeSeriesDataItem item 
                    = (TimeSeriesDataItem) this.data.get(index);
                TimeSeriesDataItem clone = (TimeSeriesDataItem) item.clone();
                try {
                    copy.add(clone);
                }
                catch (SeriesException e) {
                    System.err.println("Unable to add cloned data item.");
                }
            }
        }

        return copy;

    }

    /**
     * Creates a new timeseries by copying a subset of the data in this time 
     * series.
     *
     * @param start  the first time period to copy.
     * @param end  the last time period to copy.
     *
     * @return A time series containing a copy of this time series from start 
     *         until end.
     * 
     * @throws CloneNotSupportedException if there is a cloning problem.
     */
    public TimeSeries createCopy(RegularTimePeriod start, RegularTimePeriod end)
        throws CloneNotSupportedException {

        int startIndex = getIndex(start);
        if (startIndex < 0) {
            startIndex = -(startIndex + 1);
        }
        int endIndex = getIndex(end);
        if (endIndex < 0) {             // end period is not in original series
            endIndex = -(endIndex + 1); // this is first item AFTER end period
            endIndex = endIndex - 1;    // so this is last item BEFORE end 
        }
        
        TimeSeries result = createCopy(startIndex, endIndex);
        
        return result;

    }

    /**
     * Tests the series for equality with an arbitrary object.
     *
     * @param object  the object to test against (<code>null</code> permitted).
     *
     * @return A boolean.
     */
    public boolean equals(Object object) {
        if (object == this) {
            return true;
        }
        if (!(object instanceof TimeSeries) || !super.equals(object)) {
            return false;
        }
        TimeSeries s = (TimeSeries) object;
        if (!ObjectUtilities.equal(
            getDomainDescription(), s.getDomainDescription()
        )) {
            return false;
        }

        if (!ObjectUtilities.equal(
            getRangeDescription(), s.getRangeDescription()
        )) {
            return false;
        }

        if (!getClass().equals(s.getClass())) {
            return false;
        }

        if (getMaximumItemAge() != s.getMaximumItemAge()) {
            return false;
        }

        if (getMaximumItemCount() != s.getMaximumItemCount()) {
            return false;
        }

        int count = getItemCount();
        if (count != s.getItemCount()) {
            return false;
        }
        for (int i = 0; i < count; i++) {
            if (!getDataItem(i).equals(s.getDataItem(i))) {
                return false;
            }
        }
        return true;
    }

    /**
     * Returns a hash code value for the object.
     *
     * @return The hashcode
     */
    public int hashCode() {
        int result;
        result = (this.domain != null ? this.domain.hashCode() : 0);
        result = 29 * result + (this.range != null ? this.range.hashCode() : 0);
        result = 29 * result + (this.timePeriodClass != null 
                    ? this.timePeriodClass.hashCode() : 0);
        result = 29 * result + this.data.hashCode();
        result = 29 * result + this.maximumItemCount;
        result = 29 * result + (int) this.maximumItemAge;
        return result;
    }

}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲乱码精品一二三四区日韩在线| 91在线观看高清| 福利一区二区在线| av在线播放成人| 在线看国产日韩| 欧美精品一卡两卡| 欧美一二三区精品| 久久婷婷国产综合国色天香| 亚洲欧美日韩国产另类专区| 免费欧美日韩国产三级电影| 成人午夜在线免费| 在线成人av影院| 国产精品天美传媒沈樵| 亚洲gay无套男同| 国产一区二区三区精品欧美日韩一区二区三区 | 99久久99久久精品免费看蜜桃| 91在线小视频| 欧美老年两性高潮| 国产欧美日韩视频一区二区 | 91一区在线观看| 91精品国产高清一区二区三区蜜臀 | 欧美日韩中字一区| 国产亚洲精品bt天堂精选| 欧美精品 国产精品| 欧美激情在线看| 亚洲在线视频网站| 精品写真视频在线观看| 波多野结衣中文字幕一区二区三区 | 91玉足脚交白嫩脚丫在线播放| 日韩一级在线观看| 一区二区三区91| 丰满少妇在线播放bd日韩电影| 欧美一区三区二区| 伊人一区二区三区| 精品无码三级在线观看视频| 色先锋资源久久综合| 日韩美女视频在线| 亚洲美女区一区| 久久99精品久久久久婷婷| 91在线视频网址| 欧美一区二区在线免费观看| 亚洲精品videosex极品| 国模冰冰炮一区二区| 99精品视频在线观看免费| 欧美精品一区二区三区四区| 一区二区三区在线免费视频| 成人精品鲁一区一区二区| 精品久久久久一区二区国产| 亚洲成人免费av| 在线视频你懂得一区二区三区| 国产精品久久久久久久午夜片| 精品午夜久久福利影院 | 老司机精品视频在线| 欧美日韩中文国产| 亚洲激情在线播放| 色欧美片视频在线观看| 中文字幕欧美激情| 国产不卡视频一区| 久久久蜜桃精品| 国产精品一区免费在线观看| 日韩欧美中文字幕制服| 轻轻草成人在线| 日韩一区二区不卡| 久久99国内精品| 欧美电视剧免费全集观看| 男人的天堂久久精品| 在线不卡免费av| 免费成人美女在线观看| 日韩欧美中文字幕公布| 免费观看在线综合| 日韩你懂的在线播放| 九色综合国产一区二区三区| 欧美精品高清视频| 视频在线观看国产精品| 91精品久久久久久蜜臀| 男人的天堂亚洲一区| 日韩欧美一二三区| 国内精品伊人久久久久av影院| 日本怡春院一区二区| 国产精品久久久久四虎| 欧美本精品男人aⅴ天堂| 精品一区二区三区的国产在线播放| 欧美成人一区二区三区| 激情五月婷婷综合| 国产欧美精品在线观看| 国产成人亚洲精品青草天美| 欧美韩日一区二区三区| 91社区在线播放| 亚洲第一主播视频| 欧美一区二区三区不卡| 国产毛片精品视频| 国产女人18水真多18精品一级做 | 久久久精品tv| www.爱久久.com| 一区二区三区在线高清| 欧美日韩国产一级片| 看电影不卡的网站| 国产欧美一区二区精品性色| 色屁屁一区二区| 日本成人在线电影网| 久久这里只有精品视频网| 成人免费视频caoporn| 一区二区在线观看免费 | 久久国产麻豆精品| 国产亚洲成aⅴ人片在线观看 | 一区二区三区在线免费视频| 91麻豆精品国产| 国产一区二区三区国产| 国产精品电影一区二区三区| 欧美特级限制片免费在线观看| 日韩国产在线观看| 国产日本亚洲高清| 欧美日韩精品一二三区| 精品综合久久久久久8888| 中文字幕一区二区5566日韩| 欧美亚洲一区二区在线观看| 老色鬼精品视频在线观看播放| 国产精品网曝门| 在线播放/欧美激情| 成人深夜在线观看| 首页国产欧美日韩丝袜| 国产精品免费视频观看| 欧美精品精品一区| av成人动漫在线观看| 欧美a级理论片| 亚洲免费观看视频| 久久综合色一综合色88| 欧美三片在线视频观看 | 中文字幕视频一区二区三区久| 欧美裸体bbwbbwbbw| 高清av一区二区| 免费三级欧美电影| 亚洲日本中文字幕区| 精品成人一区二区三区四区| 欧美性高清videossexo| 成人网在线免费视频| 青青草国产成人av片免费| 亚洲精品乱码久久久久久久久| 久久品道一品道久久精品| 欧美视频在线播放| 99久久国产综合精品女不卡| 韩国毛片一区二区三区| 五月激情综合色| 亚洲欧美日韩国产一区二区三区| 久久蜜桃一区二区| 欧美一级久久久| 在线视频你懂得一区| 成人妖精视频yjsp地址| 久久精品国产99国产精品| 亚洲国产成人porn| 亚洲日本va午夜在线电影| 日本一区二区三级电影在线观看| 日韩午夜激情电影| 在线电影一区二区三区| 91黄色免费观看| 99re8在线精品视频免费播放| 国产高清成人在线| 激情伊人五月天久久综合| 奇米一区二区三区av| 婷婷综合另类小说色区| 亚洲永久免费av| 亚洲精品老司机| 亚洲人成伊人成综合网小说| 国产精品乱人伦| 国产女同性恋一区二区| 久久久久国产成人精品亚洲午夜 | 国产精品一区二区三区99| 日韩av午夜在线观看| 亚洲国产视频直播| 亚洲综合自拍偷拍| 亚洲另类春色校园小说| 成人欧美一区二区三区在线播放| 国产午夜三级一区二区三| 欧美变态tickle挠乳网站| 欧美成人精品高清在线播放| 日韩欧美www| 精品理论电影在线| 日韩欧美一级特黄在线播放| 日韩久久久精品| 久久综合九色综合欧美98| 欧美mv和日韩mv国产网站| 欧美tickle裸体挠脚心vk| 欧美www视频| 久久久91精品国产一区二区三区| 亚洲精品在线电影| 国产欧美综合在线观看第十页 | 91国偷自产一区二区使用方法| 91麻豆swag| 一本一道波多野结衣一区二区| 色诱亚洲精品久久久久久| 在线视频一区二区免费| 欧美日韩国产高清一区二区三区| 6080午夜不卡| 精品处破学生在线二十三| 中文字幕乱码亚洲精品一区| 亚洲色图自拍偷拍美腿丝袜制服诱惑麻豆 | 久久精品国产网站| 国产麻豆成人传媒免费观看| 福利一区二区在线| 一道本成人在线|