public function equals(Statement $toTest)
    {
        if ($toTest instanceof Statement &&
            $this->getSubject()->equals($toTest->getSubject()) &&
            $this->getPredicate()->equals($toTest->getPredicate()) &&
            $this->getObject()->equals($toTest->getObject())
        ) {
            if ($this->isQuad() && $toTest->isQuad() && $this->getGraph()->equals($toTest->getGraph())) {
                return true;
            } elseif ($this->isTriple() && $toTest->isTriple()) {
                return true;
            }
        }

        return false;
    }