Java 类org.jfree.chart.title.LegendGraphic 实例源码

项目:parabuild-ci    文件:LegendGraphicTests.java   
/**
 * Two objects that are equal are required to return the same hashCode. 
 */
public void testHashcode() {
    LegendGraphic g1 = new LegendGraphic(new Rectangle2D.Double(1.0, 2.0, 
            3.0, 4.0), Color.black);
    LegendGraphic g2 = new LegendGraphic(new Rectangle2D.Double(1.0, 2.0, 
            3.0, 4.0), Color.black);
    assertTrue(g1.equals(g2));
    int h1 = g1.hashCode();
    int h2 = g2.hashCode();
    assertEquals(h1, h2);
}
项目:nabs    文件:LegendGraphicTests.java   
/**
 * Two objects that are equal are required to return the same hashCode. 
 */
public void testHashcode() {
    LegendGraphic g1 = new LegendGraphic(new Rectangle2D.Double(1.0, 2.0, 
            3.0, 4.0), Color.black);
    LegendGraphic g2 = new LegendGraphic(new Rectangle2D.Double(1.0, 2.0, 
            3.0, 4.0), Color.black);
    assertTrue(g1.equals(g2));
    int h1 = g1.hashCode();
    int h2 = g2.hashCode();
    assertEquals(h1, h2);
}
项目:astor    文件:LegendGraphicTests.java   
/**
 * Two objects that are equal are required to return the same hashCode.
 */
public void testHashcode() {
    LegendGraphic g1 = new LegendGraphic(new Rectangle2D.Double(1.0, 2.0,
            3.0, 4.0), Color.black);
    LegendGraphic g2 = new LegendGraphic(new Rectangle2D.Double(1.0, 2.0,
            3.0, 4.0), Color.black);
    assertTrue(g1.equals(g2));
    int h1 = g1.hashCode();
    int h2 = g2.hashCode();
    assertEquals(h1, h2);
}