Example usage for org.jfree.data.statistics SimpleHistogramDataset removeAllBins

List of usage examples for org.jfree.data.statistics SimpleHistogramDataset removeAllBins

Introduction

In this page you can find the example usage for org.jfree.data.statistics SimpleHistogramDataset removeAllBins.

Prototype

public void removeAllBins() 

Source Link

Document

Removes all bins and sends a DatasetChangeEvent to all registered listeners.

Usage

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

/**
 * Some checks for the removeAllBins() method.
 *//*from   w ww.ja  va2  s.co m*/
@Test
public void testRemoveAllBins() {
    SimpleHistogramDataset d1 = new SimpleHistogramDataset("D1");
    d1.addBin(new SimpleHistogramBin(0.0, 1.0));
    d1.addObservation(0.5);
    d1.addBin(new SimpleHistogramBin(2.0, 3.0));
    assertEquals(2, d1.getItemCount(0));
    d1.removeAllBins();
    assertEquals(0, d1.getItemCount(0));
}