Interface Var.Provider

Enclosing class:
Var
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public static interface Var.Provider
Service Provider Interface for globally controlling Var instantiation.

Implementations may return custom subclasses of Var. Implementations should be registered via META-INF/services/org.eclipse.rdf4j.query.algebra.Var$Provider or selected with Var.PROVIDER_PROPERTY.

Important: Implementations must not call Var.of(...) from within newVar(String, Value, boolean, boolean) or cloneVar(Var) to avoid infinite recursion. Call a constructor directly (e.g., return new CustomVar(...); ). Returned instances from both methods must remain consistent with Var.equals(Object) and Var.hashCode().

  • Method Summary

    Modifier and Type
    Method
    Description
    default Var
    cloneVar(Var original)
    Creates a copy of the supplied Var.
    newVar(String name, Value value, boolean anonymous, boolean constant)
    Mirror of the primary 4-argument Var constructor.
  • Method Details

    • newVar

      Var newVar(String name, Value value, boolean anonymous, boolean constant)
      Mirror of the primary 4-argument Var constructor.
    • cloneVar

      default Var cloneVar(Var original)
      Creates a copy of the supplied Var. Implementations should ensure the clone is consistent with Var.equals(Object) and Var.hashCode() for the concrete Var subtype they produce.

      Important: Implementations must not call Var.of(...) from within this method to avoid infinite recursion. Call a constructor or factory that does not delegate back to Var.of(String).