Package com.stardog.stark.query

# 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 Summary

  Constructors
  Constructor
  Description
  `Builder()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `BindingSets.Builder`
  `add(Binding theBinding)`
  Add a `Binding` to the set.
  `BindingSets.Builder`
  `add(String theVar, Value theValue)`
  Add a binding to the set
  `BindingSets.Builder`
  `addAll(Binding... theBindings)`
  Add all of the `bindings` to this `BindingSet`
  `BindingSet`
  `build()`
  Build a new `BindingSet`.
  `Optional<Value>`
  `value(String theVar)`
  Return the value bound to the specified variable in the builder
  `BindingSets.Builder`
  `vars(String... theVars)`
  Set the names of the variables associated with this `BindingSet`
  `BindingSets.Builder`
  `vars(Set<String> theVars)`
  Sets the names of the variables associated with this `BindingSet`

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

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

- ## 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`