@param UrlPort|int|NULL $other

{@inheritDoc}
@see UrlComponentInterface::equals()
551018
public function equals($other) {
		if ($other instanceof UrlPort) {
			return ($this->isEmpty() && $other->isEmpty()) || ($this->port === $other->port);
		}
		if (is_int($other)) {
			return $this->port === $other;
		}
		if (is_null($other)) {
			return is_null($this->port);
		}
		return false;
	}
396936
@Override
  public void isEqualTo(@NullableDecl Object other) {
    if (Objects.equal(actual(), other)) {
      return;
    }

    // Fail but with a more descriptive message:

    if (!(other instanceof Map)) {
      super.isEqualTo(other);
      return;
    }

    boolean mapEquals = containsEntriesInAnyOrder((Map<?, ?>) other, "is equal to", false);
    if (mapEquals) {
      failWithoutActual(
          simpleFact(
              lenientFormat(
                  "Not true that %s is equal to <%s>. It is equal according to the contract of "
                      + "Map.equals(Object), but this implementation returned false",
                  actualAsString(), other)));
    }
  }
1265199
public function evaluate(
        $other,
        $description = 'Failed asserting that json matched pattern',
        $returnResult = false
    ) :bool {
        if ($this->isJson) {
            $patternString = json_encode($this->pattern);
            return Match::json($patternString, $other, Match::ANY_SYMBOL, function ($expected, $actual, $message) {
                $diffBuilder = new UnifiedDiffOutputBuilder("--- Pattern\n+++ Actual\n");
                $diff = (new Differ($diffBuilder))->diff(var_export($expected, true), var_export($actual, true));
                throw new ExpectationFailedException($message."\n".$diff);
            });
        }

        return Match::string($this->pattern, $other, Match::ANY_SYMBOL, function ($expected, $actual, $message) {
            $diffBuilder = new UnifiedDiffOutputBuilder("--- Pattern\n+++ Actual\n");
            $diff = (new Differ($diffBuilder))->diff($expected, $actual);
            throw new ExpectationFailedException($message."\n".$diff);
        });
    }
1300334
public function equals(Rope $other)
    {
        return $this->contents === $other->contents
            && $this->encoding === $other->encoding;
    }
1247828
public function equals(LatLngBounds $other)
    {
        if (!$this->getNorthEast()->equals($other->getNorthEast())) {
            return false;
        }

        return $this->getSouthWest()->equals($other->getSouthWest());
    }
728643
public function Compare( $other )
	{
		// BMS 2019-04-28
		// Probably need to do this for all other numeric types and the boolean
	    switch ( $other->GetValueCode() )
	    {
			case DecimalProxyFactory::Code:
				return 1;

	    	case StringProxyFactory::Code:
				return 0;

	        default:
	        	return -2;
	    }

		if ( $other->GetValueCode() == StringProxyFactory::Code )
	        return 0;
	    return -2;
	}
1053036
protected function matches($other)
    {
        foreach ($this->constraints as $key => $constraint) {
            if (! array_key_exists($key, $other)) {
                return false;
            }

            if (! $constraint->evaluate($other[$key], '', true)) {
                return false;
            }
        }

        if ($this->isStrict and array_diff_key($other, $this->constraints)) {
            return false;
        }

        return true;
    }
592131
final public function vUnion(Collection $other, $sortOrder = SORT_REGULAR)
    {
        throw new \BadMethodCallException(sprintf(self::ERR_TPL_BADM, __METHOD__));
    }
1028843
public function equals(UrlInterface $url): bool
    {
        return $this->getScheme()->equals($url->getScheme()) && $this->getHost()->equals($url->getHost()) && $this->getPort() === $url->getPort() && $this->getPath()->equals($url->getPath()) && $this->getQueryString() === $url->getQueryString() && $this->getFragment() === $url->getFragment();
    }
829617
public function Equals( $obj )
	{
		if ( ! $obj instanceof ENTITIESValue )
		{
			return false;
		}

		/**
		 * @var ENTITIESValue $other
		 */
	    $other = $obj;
	    if ( count( $other->ValueList ) != count( $this->ValueList ) ) return false;
		return count( array_diff( $other->ValueList, $this->ValueList ) ) == 0;
	}
542609
public function Equals($obj)
	{
		if ( ! $obj instanceof LanguageValue )
		{
			return false;
		}

		/**
		 * @var TokenValue $other
		 */
		$other = $obj;
		return strcmp( $this->Value, $other->Value ) == 0;
	}
238043
private function samePartialIndex(Index $other)
    {
        if ($this->hasOption('where') && $other->hasOption('where') && $this->getOption('where') === $other->getOption('where')) {
            return true;
        }

        return ! $this->hasOption('where') && ! $other->hasOption('where');
    }
364705
public function equals ($other)
	{
		ensure('Argument', $other, 'is_a_string', __CLASS__, __METHOD__);

		if ($other instanceof self) {
			return $other->to_s() === $this->string;
		}

		return $other === $this->string;
	}
39716
public function equals($anotherPath) {
		$anotherPath = $anotherPath instanceof Path ? $anotherPath : new Path($anotherPath);

		if ($this->isStream() ^ $anotherPath->isStream()) {
			return false;
		}

		if ($this->isStream() && $anotherPath->isStream()) {
			return $this->toString() === $anotherPath->toString();
		}

		return realpath($this->pathname->toString()) == realpath($anotherPath->toString());
	}
1113673
public function Equals($obj)
	{
		if ( ! $obj instanceof NMTOKENValue )
		{
			return false;
		}

		/**
		 * @var TokenValue $other
		 */
		$other = $obj;
		return strcmp( $this->Value, $other->Value ) == 0;
	}
828382
public void matches(Session other) throws ClientException {

        compareTransferParams(other);
        compareServerMode(other);

        if (needsGridFTP() && transferMode != MODE_EBLOCK) {
            throw new ClientException(ClientException.BAD_MODE,
                    "Extended block mode necessary");
        }

        if (other instanceof GridFTPSession &&
            ((GridFTPSession) other).needsGridFTP() &&
            transferMode != MODE_EBLOCK) {
            throw new ClientException(ClientException.BAD_MODE,
                    "Extended block mode necessary");
        }
    }
320396
public function compareTo($other)
    {
        if ($other === null) {
            return false;
        }
        if (!($other instanceof NumberNode)) {
            return false;
        }

        return $this->getValue() == $other->getValue();
    }