Class BindingSets.Builder

java.lang.Object
com.stardog.stark.query.BindingSets.Builder
Enclosing class:
BindingSets

public static final class BindingSets.Builder extends Object

Builder for BindingSet

Since:
5.0
Version:
5.0
Author:
Michael Grove
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • vars

      @Nonnull public BindingSets.Builder vars(@Nonnull String... theVars)
      Set the names of the variables associated with this `BindingSet`
      Parameters:
      theVars - the variables
      Returns:
      this builder
    • vars

      @Nonnull public BindingSets.Builder vars(@Nonnull Set<String> theVars)
      Sets the names of the variables associated with this `BindingSet`
      Parameters:
      theVars - the variables
      Returns:
      this builder
    • add

      @Nonnull public BindingSets.Builder add(@Nonnull String theVar, Value theValue)
      Add a binding to the set
      Parameters:
      theVar - the variable to be bound
      theValue - the value the variable is bound to
      Returns:
      this builder
    • addAll

      @Nonnull public BindingSets.Builder addAll(@Nonnull Binding... theBindings)
      Add all of the bindings to this `BindingSet`
      Parameters:
      theBindings - the binding to add
      Returns:
      this builder
    • add

      @Nonnull public BindingSets.Builder add(Binding theBinding)
      Add a Binding to the set.
      Parameters:
      theBinding - the binding to add
      Returns:
      this builder
    • value

      @Nonnull public Optional<Value> value(@Nonnull String theVar)
      Return the value bound to the specified variable in the builder
      Parameters:
      theVar - the variable name
      Returns:
      the value
    • build

      @Nonnull public BindingSet build()
      Build a new BindingSet.
      Returns:
      the new `BindingSet`