コード例 #1
0
        public bool equals(TDNode other)
        {
            bool test = false;

            if (other == null && p == null && s == null && t == null)
            {
                return(true);
            }
            else if (other == null)
            {
                return(false);
            }
            else
            {
                if (p != null && other.p != null && p.equals(other.p))
                {
                    test = true;
                }
                if (s != null && other.s != null && s.equals(other.s))
                {
                    test = true;
                }
                if (t != null && other.t != null && t.equals(other.t))
                {
                    test = true;
                }

                if (type != other.getType())
                {
                    test = false;
                }

                return(test);
            }
        }
コード例 #2
0
 public bool equals(TrapezoidFace other)
 {
     return(other == null?isEmpty() : ((top == null ? other.top == null : top.equals(other.top)) &&
                                       (bottom == null ? other.bottom == null : bottom.equals(other.bottom)) &&
                                       (leftp == null ? other.leftp == null : leftp.equals(other.leftp)) &&
                                       (rightp == null ? other.rightp == null : rightp.equals(other.rightp)) &&
                                       upperLeft == other.upperLeft &&
                                       lowerLeft == other.lowerLeft &&
                                       upperRight == other.upperRight &&
                                       lowerRight == other.lowerRight));
 }