Class: SPARQL::Algebra::Operator::LessThanOrEqual

Inherits:
Compare show all
Defined in:
lib/sparql/algebra/operator/less_than_or_equal.rb

Overview

The SPARQL relational <= (less than or equal) comparison operator.

Examples:

(<= ?x ?y)

See Also:

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

- (RDF::Literal::Boolean) apply(left, right)

Returns true if the first operand is less than or equal to the second operand; returns false otherwise.

Parameters:

  • left (RDF::Literal)

    a literal

  • right (RDF::Literal)

    a literal

Returns:

  • (RDF::Literal::Boolean)

    true or false

Raises:

  • (TypeError)

    if either operand is not a literal



27
28
29
# File 'lib/sparql/algebra/operator/less_than_or_equal.rb', line 27

def apply(left, right)
  super
end