public function equals(Definition $definition)
 {
     if (!parent::equals($definition)) {
         return false;
     }
     if (!$definition instanceof PerformanceInteractionDefinition) {
         return false;
     }
     if (null !== $this->steps xor null !== $definition->steps) {
         return false;
     }
     if (null !== $this->steps) {
         if (count($this->steps) !== count($definition->steps)) {
             return false;
         }
         foreach ($this->steps as $key => $step) {
             if (!isset($definition->steps[$key])) {
                 return false;
             }
             if (!$step->equals($definition->steps[$key])) {
                 return false;
             }
         }
     }
     return true;
 }
 public function equals(Definition $definition)
 {
     if (!parent::equals($definition)) {
         return false;
     }
     if (!$definition instanceof ChoiceInteractionDefinition) {
         return false;
     }
     if (null !== $this->choices xor null !== $definition->choices) {
         return false;
     }
     if (null !== $this->choices) {
         if (count($this->choices) !== count($definition->choices)) {
             return false;
         }
         foreach ($this->choices as $key => $choice) {
             if (!isset($definition->choices[$key])) {
                 return false;
             }
             if (!$choice->equals($definition->choices[$key])) {
                 return false;
             }
         }
     }
     return true;
 }
 public function equals(Definition $definition)
 {
     if (!parent::equals($definition)) {
         return false;
     }
     if (!$definition instanceof LikertInteractionDefinition) {
         return false;
     }
     if (null !== $this->scale xor null !== $definition->scale) {
         return false;
     }
     if (null !== $this->scale) {
         if (count($this->scale) !== count($definition->scale)) {
             return false;
         }
         foreach ($this->scale as $key => $scale) {
             if (!isset($definition->scale[$key])) {
                 return false;
             }
             if (!$scale->equals($definition->scale[$key])) {
                 return false;
             }
         }
     }
     return true;
 }
 public function equals(Definition $definition)
 {
     if (!parent::equals($definition)) {
         return false;
     }
     if (!$definition instanceof MatchingInteractionDefinition) {
         return false;
     }
     if (null !== $this->source xor null !== $definition->source) {
         return false;
     }
     if (null !== $this->target xor null !== $definition->target) {
         return false;
     }
     if (null !== $this->source) {
         if (count($this->source) !== count($definition->source)) {
             return false;
         }
         foreach ($this->source as $key => $source) {
             if (!isset($definition->source[$key])) {
                 return false;
             }
             if (!$source->equals($definition->source[$key])) {
                 return false;
             }
         }
     }
     if (null !== $this->target) {
         if (count($this->target) !== count($definition->target)) {
             return false;
         }
         foreach ($this->target as $key => $target) {
             if (!isset($definition->target[$key])) {
                 return false;
             }
             if (!$target->equals($definition->target[$key])) {
                 return false;
             }
         }
     }
     return true;
 }