Example usage for org.jfree.data.statistics DefaultMultiValueCategoryDataset getValues

List of usage examples for org.jfree.data.statistics DefaultMultiValueCategoryDataset getValues

Introduction

In this page you can find the example usage for org.jfree.data.statistics DefaultMultiValueCategoryDataset getValues.

Prototype

@Override
public List getValues(Comparable rowKey, Comparable columnKey) 

Source Link

Document

Returns a list (possibly empty) of the values for the specified item.

Usage

From source file:org.jfree.data.statistics.DefaultMultiValueCategoryDatasetTest.java

/**
 * Some checks for the add() method./*from  ww  w .  j  a v a2  s.c o m*/
 */
@Test
public void testAddValue() {
    DefaultMultiValueCategoryDataset d1 = new DefaultMultiValueCategoryDataset();

    boolean pass = false;
    try {
        d1.add(null, "R1", "C1");
    } catch (IllegalArgumentException e) {
        pass = true;
    }
    assertTrue(pass);

    List values = new ArrayList();
    d1.add(values, "R2", "C1");
    assertEquals(values, d1.getValues("R2", "C1"));

    pass = false;
    try {
        d1.add(values, null, "C2");
    } catch (IllegalArgumentException e) {
        pass = true;
    }
    assertTrue(pass);
}