Example usage for org.jfree.data.category DefaultIntervalCategoryDataset getCategoryIndex

List of usage examples for org.jfree.data.category DefaultIntervalCategoryDataset getCategoryIndex

Introduction

In this page you can find the example usage for org.jfree.data.category DefaultIntervalCategoryDataset getCategoryIndex.

Prototype

public int getCategoryIndex(Comparable category) 

Source Link

Document

Returns the index for the given category.

Usage

From source file:org.jfree.data.category.DefaultIntervalCategoryDatasetTest.java

/**
 * Some checks for the getCategoryIndex() method.
 *//*w  ww.  j av a 2s .  co  m*/
@Test
public void testGetCategoryIndex() {
    // check an empty dataset
    DefaultIntervalCategoryDataset empty = new DefaultIntervalCategoryDataset(new double[0][0],
            new double[0][0]);
    assertEquals(-1, empty.getCategoryIndex("ABC"));
}