當前位置: 首頁>>代碼示例>>Java>>正文


Java TimeSeries.equals方法代碼示例

本文整理匯總了Java中org.jfree.data.time.TimeSeries.equals方法的典型用法代碼示例。如果您正苦於以下問題:Java TimeSeries.equals方法的具體用法?Java TimeSeries.equals怎麽用?Java TimeSeries.equals使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在org.jfree.data.time.TimeSeries的用法示例。


在下文中一共展示了TimeSeries.equals方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: testRemoveSeries

import org.jfree.data.time.TimeSeries; //導入方法依賴的package包/類
/**
 * Tests the remove series method.
 */
public void testRemoveSeries() {

    final TimeSeriesCollection c1 = new TimeSeriesCollection();

    final TimeSeries s1 = new TimeSeries("Series 1");
    final TimeSeries s2 = new TimeSeries("Series 2");
    final TimeSeries s3 = new TimeSeries("Series 3");
    final TimeSeries s4 = new TimeSeries("Series 4");

    c1.addSeries(s1);
    c1.addSeries(s2);
    c1.addSeries(s3);
    c1.addSeries(s4);

    c1.removeSeries(s3);

    final TimeSeries s = c1.getSeries(2);
    final boolean b1 = s.equals(s4);
    assertTrue(b1);

}
 
開發者ID:parabuild-ci,項目名稱:parabuild-ci,代碼行數:25,代碼來源:TimeSeriesCollectionTests.java

示例2: testRemoveSeries

import org.jfree.data.time.TimeSeries; //導入方法依賴的package包/類
/**
 * Tests the remove series method.
 */
public void testRemoveSeries() {

    TimeSeriesCollection c1 = new TimeSeriesCollection();

    TimeSeries s1 = new TimeSeries("Series 1");
    TimeSeries s2 = new TimeSeries("Series 2");
    TimeSeries s3 = new TimeSeries("Series 3");
    TimeSeries s4 = new TimeSeries("Series 4");

    c1.addSeries(s1);
    c1.addSeries(s2);
    c1.addSeries(s3);
    c1.addSeries(s4);

    c1.removeSeries(s3);

    TimeSeries s = c1.getSeries(2);
    boolean b1 = s.equals(s4);
    assertTrue(b1);

}
 
開發者ID:parabuild-ci,項目名稱:parabuild-ci,代碼行數:25,代碼來源:TimeSeriesCollectionTests.java

示例3: testEquals

import org.jfree.data.time.TimeSeries; //導入方法依賴的package包/類
/**
 * Tests the equals method.
 */
public void testEquals() {
    final TimeSeries s1 = new TimeSeries("Time Series 1");
    final TimeSeries s2 = new TimeSeries("Time Series 2");
    final boolean b1 = s1.equals(s2);
    assertFalse("b1", b1);

    s2.setName("Time Series 1");
    final boolean b2 = s1.equals(s2);
    assertTrue("b2", b2);

    final RegularTimePeriod p1 = new Day();
    final RegularTimePeriod p2 = p1.next();
    s1.add(p1, 100.0);
    s1.add(p2, 200.0);
    final boolean b3 = s1.equals(s2);
    assertFalse("b3", b3);

    s2.add(p1, 100.0);
    s2.add(p2, 200.0);
    final boolean b4 = s1.equals(s2);
    assertTrue("b4", b4);

    s1.setMaximumItemCount(100);
    final boolean b5 = s1.equals(s2);
    assertFalse("b5", b5);

    s2.setMaximumItemCount(100);
    final boolean b6 = s1.equals(s2);
    assertTrue("b6", b6);

    s1.setHistoryCount(100);
    final boolean b7 = s1.equals(s2);
    assertFalse("b7", b7);

    s2.setHistoryCount(100);
    final boolean b8 = s1.equals(s2);
    assertTrue("b8", b8);
}
 
開發者ID:parabuild-ci,項目名稱:parabuild-ci,代碼行數:42,代碼來源:TimeSeriesTests.java

示例4: testEquals

import org.jfree.data.time.TimeSeries; //導入方法依賴的package包/類
/**
 * Tests the equals method.
 */
public void testEquals() {
    TimeSeries s1 = new TimeSeries("Time Series 1");
    TimeSeries s2 = new TimeSeries("Time Series 2");
    boolean b1 = s1.equals(s2);
    assertFalse("b1", b1);

    s2.setKey("Time Series 1");
    boolean b2 = s1.equals(s2);
    assertTrue("b2", b2);

    RegularTimePeriod p1 = new Day();
    RegularTimePeriod p2 = p1.next();
    s1.add(p1, 100.0);
    s1.add(p2, 200.0);
    boolean b3 = s1.equals(s2);
    assertFalse("b3", b3);

    s2.add(p1, 100.0);
    s2.add(p2, 200.0);
    boolean b4 = s1.equals(s2);
    assertTrue("b4", b4);

    s1.setMaximumItemCount(100);
    boolean b5 = s1.equals(s2);
    assertFalse("b5", b5);

    s2.setMaximumItemCount(100);
    boolean b6 = s1.equals(s2);
    assertTrue("b6", b6);

    s1.setMaximumItemAge(100);
    boolean b7 = s1.equals(s2);
    assertFalse("b7", b7);

    s2.setMaximumItemAge(100);
    boolean b8 = s1.equals(s2);
    assertTrue("b8", b8);
}
 
開發者ID:parabuild-ci,項目名稱:parabuild-ci,代碼行數:42,代碼來源:TimeSeriesTests.java


注:本文中的org.jfree.data.time.TimeSeries.equals方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。