Class: SPARQL::Algebra::Operator::NotEqual

Inherits:
Equal show all
Defined in:
lib/sparql/algebra/operator/not_equal.rb

Overview

The SPARQL relational != (not equal) comparison operator.

Constant Summary

NAME =
!=

Constants inherited from Binary

Binary::ARITY

Constants inherited from SPARQL::Algebra::Operator

ARITY

Instance Attribute Summary

Attributes inherited from SPARQL::Algebra::Operator

#operands, #options

Instance Method Summary collapse

Methods included from Evaluatable

#evaluate, #memoize

Methods inherited from Binary

#initialize

Methods inherited from SPARQL::Algebra::Operator

arity, base_uri, #base_uri, base_uri=, #boolean, #constant?, #eql?, #evaluatable?, evaluate, #executable?, for, #initialize, #inspect, #operand, #optimize, prefixes, #prefixes, prefixes=, #to_sse, #to_sxp, #variable?

Methods included from Expression

cast, #constant?, #evaluate, for, new, open, #optimize, parse, #to_sse, #variable?

Constructor Details

This class inherits a constructor from SPARQL::Algebra::Operator::Binary

Instance Method Details

#apply(term1, term2) ⇒ RDF::Literal::Boolean

Returns true if the operands are not equal; returns false otherwise.

Raises:

  • (TypeError)

    if either operand is not an RDF term



21
22
23
# File 'lib/sparql/algebra/operator/not_equal.rb', line 21

def apply(term1, term2)
  RDF::Literal(super.false?)
end