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;
    }
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;
    }
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 ; }
Checks if a given statement is equal to this instance.

@param Statement $toTest statement to check this instance against

@return bool true, if this instance is equal to the given instance, false otherwise

@api

@since 0.1
Checks if a given statement is equal to this instance .