List of usage examples for org.jfree.data.statistics DefaultBoxAndWhiskerCategoryDataset equals
@Override public boolean equals(Object obj)
From source file:org.jfree.data.statistics.DefaultBoxAndWhiskerCategoryDatasetTest.java
/** * Confirm that cloning works.//from www.j a v a 2s.co m */ @Test public void testCloning() throws CloneNotSupportedException { DefaultBoxAndWhiskerCategoryDataset d1 = new DefaultBoxAndWhiskerCategoryDataset(); d1.add(new BoxAndWhiskerItem(new Double(1.0), new Double(2.0), new Double(3.0), new Double(4.0), new Double(5.0), new Double(6.0), new Double(7.0), new Double(8.0), new ArrayList()), "ROW1", "COLUMN1"); DefaultBoxAndWhiskerCategoryDataset d2 = (DefaultBoxAndWhiskerCategoryDataset) d1.clone(); assertTrue(d1 != d2); assertTrue(d1.getClass() == d2.getClass()); assertTrue(d1.equals(d2)); // test independence d1.add(new BoxAndWhiskerItem(new Double(1.0), new Double(2.0), new Double(3.0), new Double(4.0), new Double(5.0), new Double(6.0), new Double(7.0), new Double(8.0), new ArrayList()), "ROW2", "COLUMN1"); assertFalse(d1.equals(d2)); }
From source file:org.jfree.data.statistics.DefaultBoxAndWhiskerCategoryDatasetTest.java
/** * Confirm that the equals method can distinguish all the required fields. *//*from www .jav a2s . c o m*/ @Test public void testEquals() { DefaultBoxAndWhiskerCategoryDataset d1 = new DefaultBoxAndWhiskerCategoryDataset(); d1.add(new BoxAndWhiskerItem(new Double(1.0), new Double(2.0), new Double(3.0), new Double(4.0), new Double(5.0), new Double(6.0), new Double(7.0), new Double(8.0), new ArrayList()), "ROW1", "COLUMN1"); DefaultBoxAndWhiskerCategoryDataset d2 = new DefaultBoxAndWhiskerCategoryDataset(); d2.add(new BoxAndWhiskerItem(new Double(1.0), new Double(2.0), new Double(3.0), new Double(4.0), new Double(5.0), new Double(6.0), new Double(7.0), new Double(8.0), new ArrayList()), "ROW1", "COLUMN1"); assertTrue(d1.equals(d2)); assertTrue(d2.equals(d1)); }