Tells whether the given other_value is considered the same value as the
internally set value of this valueholder.

@param EntityList $other_value list of entities

@return boolean true if the given value is considered the same value as the internal one
164295
protected function valueEquals($other_value)
    {
        if (!$other_value instanceof EntityList) {
            return false;
        }

        $entities = $this->getValue();

        if (count($entities) !== count($other_value)) {
            return false;
        }

        foreach ($entities as $index => $entity) {
            if (!$entity->isEqualTo($other_value->getItem($index))) {
                return false;
            }
        }

        return true;
    }
242713
public function isEqualTo(ValueHolderInterface $other_value_holder)
    {
        if (get_class($this) !== get_class($other_value_holder)) {
            return false;
        }

        return $this->sameValueAs($other_value_holder->getValue());
    }
886056
public boolean isOlderThan(SetElement other) {
    if (other == null) {
      return true;
    }
    return this.timestamp.isOlderThan(other.timestamp);
  }
63461
public function equals(Type $other)
    {
        $result = $other->isAssignableFrom($this) && $this->isAssignableFrom($other);
        $result2 = $this->getName() === $other->getName();
        
        //Are there any types which do not have the same name, but are assignable to each other?
        //(United types are sorted by their names)
        if ($result !== $result2)
            throw new \Exception("This should not happen - please report a bug!");
        
        return $result;
    }
947646
public boolean isMetBy(LocalProperties other) {
		if (this.ordering != null) {
			// we demand an ordering
			return other.getOrdering() != null && this.ordering.isMetBy(other.getOrdering());
		} else if (this.groupedFields != null) {
			// check if the other fields are unique
			if (other.getGroupedFields() != null && other.getGroupedFields().isValidUnorderedPrefix(this.groupedFields)) {
				return true;
			} else  {
				return other.areFieldsUnique(this.groupedFields);
			}
		} else {
			return true;
		}
	}
923066
def identical(self, other):
        
        try:
            return (self.name == other.name and
                    self._all_compat(other, 'identical'))
        except (TypeError, AttributeError):
            return False
812569
public function equals(CurrencyPair $other)
    {
        return
            $this->baseCurrency->equals($other->baseCurrency)
            && $this->counterCurrency->equals($other->counterCurrency)
            && $this->conversionRatio === $other->conversionRatio
        ;
    }
1361640
public function isEqual(EnumSet $other): bool
    {
        return $this->enumeration === $other->enumeration
            && $this->bitset === $other->bitset;
    }
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');
    }
1258870
def is_equal(self, other):
        
        other = StringCell.coerce(other)
        empties = [None,'']
        if self.value in empties and other.value in empties:
            return True
        return self.value == other.value
922959
public static int compare(Term self, Term other) {

		// Sanity check.
		if (self == null || other == null) {
			throw new NullPointerException();
		}

		// Identical objects are always equal.
		if (self == other) {
			return 0;
		}

		// Easy case is when they are not the same type of term.
		if (self.isKey() != other.isKey()) {
			return (self.isKey()) ? 1 : -1;
		}

		// Compare the underlying values.
		try {
			if (self.isKey()) {
				return self.getKey().compareTo(other.getKey());
			} else {
				return self.getIndex().compareTo(other.getIndex());
			}
		} catch (InvalidTermException consumed) {
			// This statement can never be reached because both objects are
			// either keys or indexes. This try/catch block is only here to make
			// the compiler happy.
			assert (false);
			return 0;
		}
	}
338477
public final boolean sameNodeAs(Node other)
  {

    if (!(other instanceof DTMNodeProxy))
      return false;

    DTMNodeProxy that = (DTMNodeProxy) other;

    return this.dtm == that.dtm && this.node == that.node;
  }
1050357
public boolean sameAs(BlockType other) {
        if (!this.isValid) {
            return !other.isValid && (this.isTop == other.isTop);
        } else {
            if (!other.isValid) {
                return false;
            } else {
                // Both facts are valid
                if (this.depth != other.depth) {
                    return false;
                }

                // Compare bits
                for (int i = 0; i < this.depth; ++i) {
                    if (this.get(i) != other.get(i)) {
                        return false;
                    }
                }

                return true;
            }
        }
    }
179954
public function equals( $other )
	{
		try
		{
			return $this->qnameValueHash == $other->qnameValueHash ||
				( $this->localName == $other->localName && $this->namespaceURI == $other->namespaceURI );
		}
		catch( \Exception $ex )
		{
			return false;
		}
	}
644259
protected boolean semanticallyEquivalent(BioPAXElement other)
	{
		final xref anXref = (xref) other;

		return
			(DB != null ?
				DB.equalsIgnoreCase(anXref.getDB()) :
				anXref.getDB() == null)
				&&
				(ID != null ?
					ID.equalsIgnoreCase(anXref.getID()) :
					anXref.getID() == null)
				&&
				(DB_VERSION != null ?
					DB_VERSION.equalsIgnoreCase(anXref.getDB_VERSION()) :
					anXref.getDB_VERSION() == null)
				&&
				(ID_VERSION != null ?
					ID_VERSION.equalsIgnoreCase(anXref.getID_VERSION()) :
					anXref.getID_VERSION() != null);
	}
1080597
public function compareTo($other)
    {
        if ($other === null) {
            return false;
        }
        if (!($other instanceof SubExpressionNode)) {
            return false;
        }

        return $this->getValue() == $other->getValue();
    }
395958
public function compareTo($other)
    {
        if ($other === null) {
            return false;
        }
        if (!($other instanceof VariableNode)) {
            return false;
        }

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