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

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

Introduction

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

Prototype

@Override
public boolean equals(Object obj) 

Source Link

Document

Tests this instance for equality with an arbitrary object.

Usage

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

/**
 * Confirm that the equals method can distinguish all the required fields.
 *///from w w  w . ja v a2 s  .  c o 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));
}