Class 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 Detail

      • Builder

        public Builder()
    • 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 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
      • 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