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 java.lang.Object
Builder for
BindingSet
- Since:
- 5.0
- Version:
- 5.0
- Author:
- Michael Grove
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BindingSets.Builder
add(Binding theBinding)
Add aBinding
to the set.BindingSets.Builder
add(java.lang.String theVar, Value theValue)
Add a binding to the setBindingSets.Builder
addAll(Binding... theBindings)
Add all of thebindings
to this `BindingSet`BindingSet
build()
Build a newBindingSet
.java.util.Optional<Value>
value(java.lang.String theVar)
Return the value bound to the specified variable in the builderBindingSets.Builder
vars(java.lang.String... theVars)
Set the names of the variables associated with this `BindingSet`BindingSets.Builder
vars(java.util.Set<java.lang.String> theVars)
Sets the names of the variables associated with this `BindingSet`
-
-
-
Method Detail
-
vars
@Nonnull public BindingSets.Builder vars(@Nonnull java.lang.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 java.util.Set<java.lang.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 java.lang.String theVar, Value theValue)
Add a binding to the set- Parameters:
theVar
- the variable to be boundtheValue
- the value the variable is bound to- Returns:
- this builder
-
addAll
@Nonnull public BindingSets.Builder addAll(@Nonnull Binding... theBindings)
Add all of thebindings
to this `BindingSet`- Parameters:
theBindings
- the binding to add- Returns:
- this builder
-
add
@Nonnull public BindingSets.Builder add(Binding theBinding)
Add aBinding
to the set.- Parameters:
theBinding
- the binding to add- Returns:
- this builder
-
value
@Nonnull public java.util.Optional<Value> value(@Nonnull java.lang.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 newBindingSet
.- Returns:
- the new `BindingSet`
-
-