Example usage for org.jfree.data.xy YInterval YInterval

List of usage examples for org.jfree.data.xy YInterval YInterval

Introduction

In this page you can find the example usage for org.jfree.data.xy YInterval YInterval.

Prototype

public YInterval(double y, double yLow, double yHigh) 

Source Link

Document

Creates a new instance of YInterval.

Usage

From source file:org.jfree.data.xy.YIntervalTest.java

/**
 * Confirm that the equals method can distinguish all the required fields.
 *//*from   ww  w  . j av a 2s  .  co  m*/
@Test
public void testEquals() {
    YInterval i1 = new YInterval(1.0, 0.5, 1.5);
    YInterval i2 = new YInterval(1.0, 0.5, 1.5);
    assertEquals(i1, i2);

    i1 = new YInterval(1.1, 0.5, 1.5);
    assertFalse(i1.equals(i2));
    i2 = new YInterval(1.1, 0.5, 1.5);
    assertTrue(i1.equals(i2));

    i1 = new YInterval(1.1, 0.55, 1.5);
    assertFalse(i1.equals(i2));
    i2 = new YInterval(1.1, 0.55, 1.5);
    assertTrue(i1.equals(i2));

    i1 = new YInterval(1.1, 0.55, 1.55);
    assertFalse(i1.equals(i2));
    i2 = new YInterval(1.1, 0.55, 1.55);
    assertTrue(i1.equals(i2));
}

From source file:org.jfree.data.xy.YIntervalTest.java

/**
 * This class is immutable./*from ww  w. ja  v  a2s.co  m*/
 */
@Test
public void testCloning() {
    YInterval i1 = new YInterval(1.0, 0.5, 1.5);
    assertFalse(i1 instanceof Cloneable);
}

From source file:org.jfree.data.xy.YIntervalTest.java

/**
 * Serialize an instance, restore it, and check for equality.
 *//*from w w w.  j a  v  a  2s.  com*/
@Test
public void testSerialization() {
    YInterval i1 = new YInterval(1.0, 0.5, 1.5);
    YInterval i2 = (YInterval) TestUtilities.serialised(i1);
    assertEquals(i1, i2);
}