private function getIdenticalObject(BaseObject $object)
 {
     $objectHashCode = null;
     foreach ($this as $obj) {
         if ($obj instanceof BaseObject) {
             if (null === $objectHashCode) {
                 $objectHashCode = $object->hashCode();
             }
             if ($obj->hashCode() === $objectHashCode) {
                 return $obj;
             }
         }
     }
     return null;
 }
 private function getIdenticalObject(BaseObject $object)
 {
     foreach ($this as $obj) {
         if ($obj instanceof BaseObject && $obj->hashCode() === $object->hashCode()) {
             return $obj;
         }
     }
     return null;
 }