コード例 #1
0
 @Override
 public boolean equals(Object obj) {
   if (this == obj) return true;
   if (obj == null) return false;
   if (getClass() != obj.getClass()) return false;
   @SuppressWarnings("unchecked")
   AbstractQuadTreeNode<E> other = (AbstractQuadTreeNode<E>) obj;
   if (parent == null) {
     if (other.parent != null) return false;
   } else if (!parent.equals(other.parent)) return false;
   if (splitPoint == null) {
     if (other.splitPoint != null) return false;
   } else if (!splitPoint.equals(other.splitPoint)) return false;
   return true;
 }