Example usage for org.jfree.data.xy MatrixSeries clone

List of usage examples for org.jfree.data.xy MatrixSeries clone

Introduction

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

Prototype

@Override
public Object clone() throws CloneNotSupportedException 

Source Link

Document

Returns a clone of the series.

Usage

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

/**
 * Confirm that cloning works.//from   www .  j  a v  a 2 s . c o  m
 */
@Test
public void testCloning() throws CloneNotSupportedException {
    MatrixSeries m1 = new MatrixSeries("Test", 8, 3);
    m1.update(0, 0, 11.0);
    m1.update(7, 2, 22.0);
    MatrixSeries m2 = (MatrixSeries) m1.clone();
    assertTrue(m1 != m2);
    assertTrue(m1.getClass() == m2.getClass());
    assertTrue(m1.equals(m2));
}