Tells whether a specific ValueHolderInterface instance's value is
considered equal to the given value.

@param mixed $other_value

@return boolean
320975
public function sameValueAs($other_value)
    {
        $null_value = $this->attribute->getNullValue();
        if ($null_value === $this->getValue() && $null_value === $other_value) {
            return true;
        }

        $validation_result = $this->getAttribute()->getValidator()->validate($other_value);
        if ($validation_result->getSeverity() !== IncidentInterface::SUCCESS) {
            return false;
        }

        return $this->valueEquals($validation_result->getSanitizedValue());
    }
361574
public function Equals( $obj )
	{
		if ( ! $obj instanceof GDayValue )
		{
			return false;
		}

		/**
		 * @var DateTimeValueBase $other
		 */
		$other = $obj;
		return $this->ToString( null ) == $other->ToString( null );
	}
20648
def equals(self, other):
        
        if self.is_(other):
            return True

        if not isinstance(other, Index):
            return False

        if not isinstance(other, MultiIndex):
            other_vals = com.values_from_object(ensure_index(other))
            return array_equivalent(self._ndarray_values, other_vals)

        if self.nlevels != other.nlevels:
            return False

        if len(self) != len(other):
            return False

        for i in range(self.nlevels):
            self_codes = self.codes[i]
            self_codes = self_codes[self_codes != -1]
            self_values = algos.take_nd(np.asarray(self.levels[i]._values),
                                        self_codes, allow_fill=False)

            other_codes = other.codes[i]
            other_codes = other_codes[other_codes != -1]
            other_values = algos.take_nd(
                np.asarray(other.levels[i]._values),
                other_codes, allow_fill=False)

            # since we use NaT both datetime64 and timedelta64
            # we can have a situation where a level is typed say
            # timedelta64 in self (IOW it has other values than NaT)
            # but types datetime64 in other (where its all NaT)
            # but these are equivalent
            if len(self_values) == 0 and len(other_values) == 0:
                continue

            if not array_equivalent(self_values, other_values):
                return False

        return True
235157
public static function haveTheSameValue($value1, $value2)
    {
        if (\is_array($value1)) {
            if (!self::areRecursivelyEquals($value1, $value2)) {
                return false;
            }
        } else {
            if ($value1 !== $value2) {
                return false;
            }
        }

        return true;
    }
850889
public function compareTo($other): bool {
        if(!($other instanceof $this)) {
            return FALSE;
        }
        if($this->getFileName() !== $other->getFileName()) {
            return FALSE;
        }
        return TRUE;
    }
572492
public function equals(AttributeTypeAndValue $other): bool
    {
        // check that attribute types match
        if ($this->oid() !== $other->oid()) {
            return false;
        }
        $matcher = $this->_value->equalityMatchingRule();
        $result = $matcher->compare($this->_value->stringValue(),
            $other->_value->stringValue());
        // match
        if ($result) {
            return true;
        }
        // no match or Undefined
        return false;
    }
408455
function equals( $other ) {
		if( ! ( $other instanceof Address ) ) {
			return false;
		}
		return $this === $other
			|| $this->asString() === $other->asString();
	}
812569
public function equals(CurrencyPair $other)
    {
        return
            $this->baseCurrency->equals($other->baseCurrency)
            && $this->counterCurrency->equals($other->counterCurrency)
            && $this->conversionRatio === $other->conversionRatio
        ;
    }
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;
    }
265429
public function equals($other = null): bool
    {
        if (is_null($other)) {
            return false;
        } else {
            return
                $other instanceof static &&
                $other->getChoiceString() === $this->getChoiceString();
        }
    }
842051
public function Equals( $obj )
	{
		if ( ! $obj instanceof TimeValue )
		{
			return false;
		}

		/**
		 * @var DateTimeValueBase $other
		 */
		$other = $obj;
		return $this->ToString( null ) == $other->ToString( null );
	}
596352
public function compareTo($other)
    {
        if ($other === null) {
            return false;
        }
        if (!($other instanceof FunctionNode)) {
            return false;
        }

        $thisOperand = $this->getOperand();
        $otherOperand = $other->getOperand();

        return $this->getName() == $other->getName() && $thisOperand->compareTo($otherOperand);
    }
590316
public function equals(Name $other): bool
    {
        // if RDN count doesn't match
        if (count($this) != count($other)) {
            return false;
        }
        for ($i = count($this) - 1; $i >= 0; --$i) {
            $rdn1 = $this->_rdns[$i];
            $rdn2 = $other->_rdns[$i];
            if (!$rdn1->equals($rdn2)) {
                return false;
            }
        }
        return true;
    }
144829
public function equal($other, $delta = .0)
    {
        $this->isNumeric();

        if (0 === $delta) {
            return parent::equal($other);
        }

        return $this->doCheck(function ($value) use ($other, $delta) {
            $this->throwExceptionIfFalse(
                $this->isBetween($value - $other, -$delta, $delta),
                'Value %s is not equal to %s (±%s)', $value, $other, $delta
            );
        });
    }
179954
public function equals( $other )
	{
		try
		{
			return $this->qnameValueHash == $other->qnameValueHash ||
				( $this->localName == $other->localName && $this->namespaceURI == $other->namespaceURI );
		}
		catch( \Exception $ex )
		{
			return false;
		}
	}
1308826
public function containsValuesEqualToVariableDefaultOnly()
    {
        $data = $this->getDataPlaceHolder();
        
        foreach ($data as $variable) {
            $value = $variable->getValue();
            $default = $variable->getDefaultValue();
            
            if (Utils::isNull($value) === true) {
                if (Utils::isNull($default) === false) {
                    return false;
                }
            } elseif ($value->equals($default) === false) {
                return false;
            }
        }
        
        return true;
    }