当前位置: 首页>>代码示例>>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;未经允许,请勿转载。