public function containsNode(NodeInterface $node) { foreach ($this->nodes as $n) { if ($n->identity() === $node->identity()) { return true; } } return false; }