Java 类org.jfree.chart.annotations.XYPolygonAnnotation 实例源码

项目:parabuild-ci    文件:XYPolygonAnnotationTests.java   
/**
 * Two objects that are equal are required to return the same hashCode. 
 */
public void testHashCode() {
    Stroke stroke = new BasicStroke(2.0f);
    XYPolygonAnnotation a1 = new XYPolygonAnnotation(new double[] {1.0, 
            2.0, 3.0, 4.0, 5.0, 6.0}, stroke, Color.red, Color.blue);
    XYPolygonAnnotation a2 = new XYPolygonAnnotation(new double[] {1.0, 
            2.0, 3.0, 4.0, 5.0, 6.0}, stroke, Color.red, Color.blue);
    assertTrue(a1.equals(a2));
    int h1 = a1.hashCode();
    int h2 = a2.hashCode();
    assertEquals(h1, h2);
}
项目:nabs    文件:XYPolygonAnnotationTests.java   
/**
 * Two objects that are equal are required to return the same hashCode. 
 */
public void testHashCode() {
    Stroke stroke = new BasicStroke(2.0f);
    XYPolygonAnnotation a1 = new XYPolygonAnnotation(new double[] {1.0, 
            2.0, 3.0, 4.0, 5.0, 6.0}, stroke, Color.red, Color.blue);
    XYPolygonAnnotation a2 = new XYPolygonAnnotation(new double[] {1.0, 
            2.0, 3.0, 4.0, 5.0, 6.0}, stroke, Color.red, Color.blue);
    assertTrue(a1.equals(a2));
    int h1 = a1.hashCode();
    int h2 = a2.hashCode();
    assertEquals(h1, h2);
}
项目:astor    文件:XYPolygonAnnotationTests.java   
/**
 * Two objects that are equal are required to return the same hashCode.
 */
public void testHashCode() {
    Stroke stroke = new BasicStroke(2.0f);
    XYPolygonAnnotation a1 = new XYPolygonAnnotation(new double[] {1.0,
            2.0, 3.0, 4.0, 5.0, 6.0}, stroke, Color.red, Color.blue);
    XYPolygonAnnotation a2 = new XYPolygonAnnotation(new double[] {1.0,
            2.0, 3.0, 4.0, 5.0, 6.0}, stroke, Color.red, Color.blue);
    assertTrue(a1.equals(a2));
    int h1 = a1.hashCode();
    int h2 = a2.hashCode();
    assertEquals(h1, h2);
}
项目:astor    文件:XYPolygonAnnotationTests.java   
/**
 * Checks that this class implements PublicCloneable.
 */
public void testPublicCloneable() {
    Stroke stroke1 = new BasicStroke(2.0f);
    XYPolygonAnnotation a1 = new XYPolygonAnnotation(new double[] {1.0,
            2.0, 3.0, 4.0, 5.0, 6.0}, stroke1, Color.red, Color.blue);
    assertTrue(a1 instanceof PublicCloneable);
}