/** * @param ValueObjectInterface $other * @return boolean */ public function sameValueAs(ValueObjectInterface $other) { if (!$other instanceof ProcessStep) { return false; } if ($this->isAgentDescription()) { if (!$other->isAgentDescription()) { return false; } return $this->agentDescription()->sameValueAs($other->agentDescription()); } else { if ($other->isAgentDescription()) { return false; } return EqualsBuilder::create()->append($this->roleDescription()->sameValueAs($other->roleDescription()), true)->append($this->actionDescription()->sameValueAs($other->actionDescription()), true)->equals(); } }