ShapeUtils.java 文件源码

java
阅读 23 收藏 0 点赞 0 评论 0

项目:jfreechart 作者:
/**
 * Compares two arcs and returns {@code true} if they are equal or
 * both {@code null}.
 *
 * @param a1  the first arc ({@code null} permitted).
 * @param a2  the second arc ({@code null} permitted).
 *
 * @return A boolean.
 */
public static boolean equal(Arc2D a1, Arc2D a2) {
    if (a1 == null) {
        return (a2 == null);
    }
    if (a2 == null) {
        return false;
    }
    if (!a1.getFrame().equals(a2.getFrame())) {
        return false;
    }
    if (a1.getAngleStart() != a2.getAngleStart()) {
        return false;
    }
    if (a1.getAngleExtent() != a2.getAngleExtent()) {
        return false;
    }
    if (a1.getArcType() != a2.getArcType()) {
        return false;
    }
    return true;
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号