/** * @param ValueObjectInterface $other * @return bool */ public function sameValueAs(ValueObjectInterface $other) { if (!$other instanceof Leg) { return false; } return EqualsBuilder::create()->append($this->loadLocation(), $other->loadLocation())->append($this->unloadLocation(), $other->unloadLocation())->append($this->loadTime()->getTimestamp(), $other->loadTime()->getTimestamp())->append($this->unloadTime()->getTimestamp(), $other->unloadTime()->getTimestamp())->equals(); }