operator == method

  1. @override
bool operator ==(
  1. Object other
)
override

Compares this quad to another object for equality

Two quads are equal if all four components (subject, predicate, object, graph) are equal. This includes proper handling of null graph names for default graph quads.

Parameters:

  • other The object to compare against

Returns: true if the other object is a Quad with identical components, false otherwise.

Implementation

@override
bool operator ==(Object other) {
  if (identical(this, other)) return true;
  if (other is! Quad) return false;

  return subject == other.subject &&
      predicate == other.predicate &&
      object == other.object &&
      graphName == other.graphName;
}