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

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

Introduction

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

Prototype

public XYInterval(double xLow, double xHigh, double y, double yLow, double yHigh) 

Source Link

Document

Creates a new instance of XYInterval.

Usage

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

/**
 * Confirm that the equals method can distinguish all the required fields.
 *//*from  w w  w .j a va  2s.c om*/
@Test
public void testEquals() {
    XYInterval i1 = new XYInterval(1.0, 2.0, 3.0, 2.5, 3.5);
    XYInterval i2 = new XYInterval(1.0, 2.0, 3.0, 2.5, 3.5);
    assertEquals(i1, i2);

    i1 = new XYInterval(1.1, 2.0, 3.0, 2.5, 3.5);
    assertFalse(i1.equals(i2));
    i2 = new XYInterval(1.1, 2.0, 3.0, 2.5, 3.5);
    assertTrue(i1.equals(i2));

    i1 = new XYInterval(1.1, 2.2, 3.0, 2.5, 3.5);
    assertFalse(i1.equals(i2));
    i2 = new XYInterval(1.1, 2.2, 3.0, 2.5, 3.5);
    assertTrue(i1.equals(i2));

    i1 = new XYInterval(1.1, 2.2, 3.3, 2.5, 3.5);
    assertFalse(i1.equals(i2));
    i2 = new XYInterval(1.1, 2.2, 3.3, 2.5, 3.5);
    assertTrue(i1.equals(i2));

    i1 = new XYInterval(1.1, 2.2, 3.3, 2.6, 3.5);
    assertFalse(i1.equals(i2));
    i2 = new XYInterval(1.1, 2.2, 3.3, 2.6, 3.5);
    assertTrue(i1.equals(i2));

    i1 = new XYInterval(1.1, 2.2, 3.3, 2.6, 3.6);
    assertFalse(i1.equals(i2));
    i2 = new XYInterval(1.1, 2.2, 3.3, 2.6, 3.6);
    assertTrue(i1.equals(i2));
}

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

/**
 * This class is immutable./*ww w .j  a  v  a2  s .c  o m*/
 */
@Test
public void testCloning() {
    XYInterval i1 = new XYInterval(1.0, 2.0, 3.0, 2.5, 3.5);
    assertFalse(i1 instanceof Cloneable);
}

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

/**
 * Serialize an instance, restore it, and check for equality.
 *//*from   www.j a  va 2s  .  c  o m*/
@Test
public void testSerialization() {
    XYInterval i1 = new XYInterval(1.0, 2.0, 3.0, 2.5, 3.5);
    XYInterval i2 = (XYInterval) TestUtilities.serialised(i1);
    assertEquals(i1, i2);
}