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

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

Introduction

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

Prototype

public YWithXInterval(double y, double xLow, double xHigh) 

Source Link

Document

Creates a new instance of YWithXInterval.

Usage

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

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

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

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

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

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

/**
 * This class is immutable.//from w w  w  .jav a 2  s  . c o m
 */
@Test
public void testCloning() {
    YWithXInterval i1 = new YWithXInterval(1.0, 0.5, 1.5);
    assertFalse(i1 instanceof Cloneable);
}

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

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