Package org.eclipse.rdf4j.query.algebra.evaluation

## Class QueryValueEvaluationStep.ConstantQueryValueEvaluationStep

- java.lang.Object
- - org.eclipse.rdf4j.query.algebra.evaluation.QueryValueEvaluationStep.ConstantQueryValueEvaluationStep

- All Implemented Interfaces:
    `QueryValueEvaluationStep`
  Enclosing interface:
    QueryValueEvaluationStep

      public static class QueryValueEvaluationStep.ConstantQueryValueEvaluationStep
      extends Object
      implements QueryValueEvaluationStep

  A QueryValueEvalationStep that will return the same constant value throughout the query execution. As these rather result just in a value we set the value at precompile time.

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface org.eclipse.rdf4j.query.algebra.evaluation.QueryValueEvaluationStep

      `QueryValueEvaluationStep.ConstantQueryValueEvaluationStep, QueryValueEvaluationStep.Minimal`

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `ConstantQueryValueEvaluationStep​(Value valueConstant)` |
    `ConstantQueryValueEvaluationStep​(ValueConstant valueConstant)` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `Value` | `evaluate​(BindingSet bindings)` |
    `boolean` | `isConstant()` | If an value expression results in a constant then it may be executed once per query invocation.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### ConstantQueryValueEvaluationStep

          public ConstantQueryValueEvaluationStep​(ValueConstant valueConstant)

    - #### ConstantQueryValueEvaluationStep

          public ConstantQueryValueEvaluationStep​(Value valueConstant)

  - ### Method Detail

    - #### evaluate

          public Value evaluate​(BindingSet bindings)
                         throws QueryEvaluationException

      Specified by:
        `evaluate` in interface `QueryValueEvaluationStep`
      Throws:
        `QueryEvaluationException`

    - #### isConstant

          public boolean isConstant()

      Description copied from interface: `QueryValueEvaluationStep`
      If an value expression results in a constant then it may be executed once per query invocation. This can reduce computation time significantly.
      Specified by:
        `isConstant` in interface `QueryValueEvaluationStep`
      Returns:
        if this ValueExpresionStep will always return the same value