Test whether one QName is less than another

@param QName $other
@return boolean
341253
public function lessThan( $other )
	{
		return $this->namespaceURI == null && $other->namespaceURI ||
		$this->namespaceURI && $other->namespaceURI && $this->namespaceURI < $other->namespaceURI ||
		$this->namespaceURI == $other->namespaceURI && $this->localName < $other->localName;
	}
68904
public function equals($other): bool
    {
        if (is_array($other) || $other instanceof self) {
            return count($other) === count($this) &&
                $this->zip($other)->every(
                    function ($tuple) {
                        list($a, $b) = $tuple;

                        if ($a instanceof Equalable) {
                            return $a->equals($b);
                        }

                        return $a === $b;
                    }
                );
        }

        throw new \InvalidArgumentException('`$other` must be `Seq` or `array`');
    }
1240633
protected function compare($a, $b)
    {
        if (is_null($this->comparator)) {
            if ($a < $b) {
                return -1;
            }
            if ($a > $b) {
                return 1;
            }
            return 0;
        }

        return call_user_func($this->comparator, $a, $b);
    }
605925
public function matches($other)
    {
        $imgOther = new GDImage($other);
        $imgExpec = new GDImage($this->expected);

        $w = $imgExpec->getWidth();
        $h = $imgOther->getHeight();

        if ($w !== $imgOther->getWidth() || $h !== $imgOther->getHeight()) {
            return false;
        }

        // delta = sum of per-pixel differences
        $delta = 0;
        for ($x = 0; $x < $w; ++$x) {
            for ($y = 0; $y < $h; ++$y) {
                $delta += $this->getPixelError($imgExpec, $imgOther, $x, $y);
            }
        }

        $imgExpec->finish();
        $imgOther->finish();

        // error is in range 0..1
        $error = $delta / ($w * $h);

        return $error <= $this->threshold;
    }
1012282
public boolean isSameAs( AstNode other ) {
        if (other == null) {
            return false;
        }
        if (!this.name.equals(other.name)) {
            return false;
        }
        if (!this.properties.equals(other.properties)) {
            return false;
        }
        if (this.getChildCount() != other.getChildCount()) {
            return false;
        }
        Iterator<AstNode> thisChildren = this.getChildren().iterator();
        Iterator<AstNode> thatChildren = other.getChildren().iterator();
        while (thisChildren.hasNext() && thatChildren.hasNext()) {
            if (!thisChildren.next().isSameAs(thatChildren.next())) {
                return false;
            }
        }
        return true;
    }
596318
protected function matches($other): bool
    {
        $this->resetProblems();
        if (!($other instanceof EventSubscriberInterface)) {
            $this->addProblem('Subscriber must implement \Symfony\Component\EventDispatcher\EventSubscriberInterface.');
            return false;
        }
        $subscribedEvents = call_user_func(array(get_class($other), 'getSubscribedEvents'));
        if (!is_array($subscribedEvents)) {
            $this->addProblem('getSubscribedEvents() must return an array.');
            return false;
        }
        foreach ($subscribedEvents as $event => $subscription) {
            /* @var $event string */
            /* @var $subscription mixed|string|array */
            $this->checkListener($other, $event, $subscription);
        }
        return !$this->hasProblems();
    }
1042373
public function Equals( $obj )
	{
		if ( ! $obj instanceof QNameValue )
		{
			return false;
		}

		/**
		 * @var QNameValue $other
		 */
		$other = $obj;
		// // BMS 2017-09-13 The xfi test fact-dimension-s-equal2 V18 requires this comparison
		// return (string)$this == (string)$other;
		return $this->LocalName == $other->LocalName && $this->NamespaceUri == $other->NamespaceUri;
	}
203236
public function equals($other) {
		if ($other instanceof UrlHost) {
			return ($this->isEmpty() && $other->isEmpty()) || ($this->str === $other->str);
		}
		if (is_null($other)) {
			return is_null($this->str);
		}
		if (is_string($other)) {
			return $this->__toString() === $other;
		}
		return false;
	}
911854
public function equals(Target $other): bool
    {
        if ($this->_type != $other->_type) {
            return false;
        }
        if ($this->toASN1()->toDER() != $other->toASN1()->toDER()) {
            return false;
        }
        return true;
    }
695094
public function greaterThan( $other )
	{
		return $this->namespaceURI && $other->namespaceURI == null ||
		$this->namespaceURI && $other->namespaceURI && $this->namespaceURI > $other->namespaceURI ||
		$this->namespaceURI == $other->namespaceURI && $this->localName > $other->localName;
	}
637151
public function equals($other, $considerAffix=false)
    {

        if ($other instanceof self) {
            return $considerAffix ? ($other->toString() == $this->toString())
                                  : ($other->getSource() == $this->source);
        }

        $other = "$other";

        if ($considerAffix) {
            return $other == $this->toString();
        }

        $cleaned = $other;

        if ($this->prefix && mb_strpos($other, $this->prefix) === 0) {
            $cleaned = mb_substr($other, mb_strlen($this->prefix));
        }

        if ($this->suffix && mb_strpos($other, $this->suffix)) {
            $cleaned = mb_substr($cleaned, 0, 0-mb_strlen($this->suffix));
        }

        if ($this->hasDifferentAffixes()){
            $cleaned = trim($cleaned, $this->glue);
        }

        $me = implode($this->glue, $this->source);

        return ($me == $other || $me == $cleaned);


    }
576868
public function compare(self $other)
    {
        $this->assertSameCurrency($other);

        if ($this->amount < $other->amount) {
            return -1;
        }

        if ($this->amount > $other->amount) {
            return 1;
        }

        return 0;
    }
594463
public function isUnionType( $qname )
	{
		$name = $qname instanceof QName ? "{$qname->prefix}:{$qname->localName}" : $qname;

		$type = $this->getType( $name );
		if ( ! $type ) return false;

		if ( isset( $type['restrictionType'] ) && $type['restrictionType'] == 'union' )
		{
			return true;
		}

		if ( ! isset( $type['parent'] ) ) return false;
		$name = $type['parent'];

		$type = $this->getType( $name );
		if ( ! $type ) return false;

		return isset( $type['restrictionType'] ) && $type['restrictionType'] == 'union';
	}
1080633
public function lt($other)
    {
        if (!($other instanceof self)) {
            $other = new BigInt($other);
        }
        return ($this->compare($other) < 0);
    }
948789
public function compare(Money $other)
    {
        $this->assertSameCurrency($other);

        return $this->getCalculator()->compare($this->amount, $other->amount);
    }
339192
protected function matches($other): bool
    {
        if (is_array($other)) {
            $success = null;
            foreach ($other as $item) {
                $currentSuccess = $this->matchesSection($item);
                $success = ($success === null ? $currentSuccess : $success || $currentSuccess);
            }
            return !empty($success);
        } else {
            return $this->matchesSection($other);
        }
    }
830562
public function compareTo($other)
    {
        if ($other === null) {
            return false;
        }
        if ($other instanceof IntegerNode) {
            return $this->getDenominator() == 1 && $this->getNumerator() == $other->getValue();
        }
        if (!($other instanceof RationalNode)) {
            return false;
        }

        return $this->getNumerator() == $other->getNumerator() && $this->getDenominator() == $other->getDenominator();
    }