public function equals(CollectionInterface $collection)
 {
     $this->validateValueType($collection->getValueType());
     if ($this->count() != $collection->count()) {
         return false;
     }
     return $this->equalArrays($this->toArray(), $collection->toArray());
 }