/// <summary> /// Implementation of Equals for Blank Nodes. /// </summary> /// <param name="other">Object to compare with the Blank Node.</param> /// <returns></returns> /// <remarks> /// Blank Nodes are considered equal if their internal IDs match precisely and they originate from the same Graph. /// </remarks> public override bool Equals(INode other) { if ((Object)other == null) { return(false); } if (ReferenceEquals(this, other)) { return(true); } if (other.NodeType == NodeType.Blank) { IBlankNode temp = (IBlankNode)other; return(EqualityHelper.AreBlankNodesEqual(this, temp)); } else { // Can only be equal to Blank Nodes return(false); } }
/// <summary> /// Determines whether this Node is equal to another. /// </summary> /// <param name="other">Other Blank Node.</param> /// <returns></returns> public override bool Equals(IBlankNode other) { return(EqualityHelper.AreBlankNodesEqual(this, other)); }