Interface IValueBuilder<T>

    • Method Detail

      • whenBoolean

        default IValueBuilder<T> whenBoolean​(Consumer<? super IBooleanValueBuilder> action)
        Description copied from interface: IValueConfigurator
        Execute the given action with this builder as a boolean value builder, if this builder is of that type. Does nothing otherwise.
        Specified by:
        whenBoolean in interface IValueConfigurator
        Parameters:
        action - Action to execute if this builder is of the desired type.
        Returns:
        getThis() builder instance to chain method calls.
      • whenConst

        default IValueBuilder<T> whenConst​(Consumer<? super IConstValueBuilder<?>> action)
        Description copied from interface: IValueConfigurator
        Execute the given action with this builder as a const value builder, if this builder is of that type. Does nothing otherwise.
        Specified by:
        whenConst in interface IValueConfigurator
        Parameters:
        action - Action to execute if this builder is of the desired type.
        Returns:
        getThis() builder instance to chain method calls.
      • whenFloat

        default IValueBuilder<T> whenFloat​(Consumer<? super IFloatValueBuilder> action)
        Description copied from interface: IValueConfigurator
        Execute the given action with this builder as a float value builder, if this builder is of that type. Does nothing otherwise.
        Specified by:
        whenFloat in interface IValueConfigurator
        Parameters:
        action - Action to execute if this builder is of the desired type.
        Returns:
        getThis() builder instance to chain method calls.
      • whenInteger

        default IValueBuilder<T> whenInteger​(Consumer<? super IIntegerValueBuilder> action)
        Description copied from interface: IValueConfigurator
        Execute the given action with this builder as a integer value builder, if this builder is of that type. Does nothing otherwise.
        Specified by:
        whenInteger in interface IValueConfigurator
        Parameters:
        action - Action to execute if this builder is of the desired type.
        Returns:
        getThis() builder instance to chain method calls.
      • whenList

        default IValueBuilder<T> whenList​(Consumer<? super IListValueBuilder<?>> action)
        Description copied from interface: IValueConfigurator
        Execute the given action with this builder as a list value builder, if this builder is of that type. Does nothing otherwise.
        Specified by:
        whenList in interface IValueConfigurator
        Parameters:
        action - Action to execute if this builder is of the desired type.
        Returns:
        getThis() builder instance to chain method calls.
      • whenMap

        default IValueBuilder<T> whenMap​(Consumer<? super IMapValueBuilder<?>> action)
        Description copied from interface: IValueConfigurator
        Execute the given action with this builder as a map value builder, if this builder is of that type. Does nothing otherwise.
        Specified by:
        whenMap in interface IValueConfigurator
        Parameters:
        action - Action to execute if this builder is of the desired type.
        Returns:
        getThis() builder instance to chain method calls.
      • whenNull

        default IValueBuilder<T> whenNull​(Consumer<? super INullValueBuilder> action)
        Description copied from interface: IValueConfigurator
        Execute the given action with this builder as a null value builder, if this builder is of that type. Does nothing otherwise.
        Specified by:
        whenNull in interface IValueConfigurator
        Parameters:
        action - Action to execute if this builder is of the desired type.
        Returns:
        getThis() builder instance to chain method calls.
      • whenRecord

        default IValueBuilder<T> whenRecord​(Consumer<? super IRecordValueBuilder> action)
        Description copied from interface: IValueConfigurator
        Execute the given action with this builder as a record value builder, if this builder is of that type. Does nothing otherwise.
        Specified by:
        whenRecord in interface IValueConfigurator
        Parameters:
        action - Action to execute if this builder is of the desired type.
        Returns:
        getThis() builder instance to chain method calls.
      • whenString

        default IValueBuilder<T> whenString​(Consumer<? super IStringValueBuilder> action)
        Description copied from interface: IValueConfigurator
        Execute the given action with this builder as a string value builder, if this builder is of that type. Does nothing otherwise.
        Specified by:
        whenString in interface IValueConfigurator
        Parameters:
        action - Action to execute if this builder is of the desired type.
        Returns:
        getThis() builder instance to chain method calls.
      • whenTuple

        default IValueBuilder<T> whenTuple​(Consumer<? super ITupleValueBuilder> action)
        Description copied from interface: IValueConfigurator
        Execute the given action with this builder as a tuple value builder, if this builder is of that type. Does nothing otherwise.
        Specified by:
        whenTuple in interface IValueConfigurator
        Parameters:
        action - Action to execute if this builder is of the desired type.
        Returns:
        getThis() builder instance to chain method calls.
      • whenUnion

        default IValueBuilder<T> whenUnion​(Consumer<? super IUnionValueBuilder<?>> action)
        Description copied from interface: IValueConfigurator
        Execute the given action with this builder as a union value builder, if this builder is of that type. Does nothing otherwise.
        Specified by:
        whenUnion in interface IValueConfigurator
        Parameters:
        action - Action to execute if this builder is of the desired type.
        Returns:
        getThis() builder instance to chain method calls.
      • whenUnion

        default <D> IValueConfigurator whenUnion​(Class<D> discriminatorClass,
                                                 Consumer<? super IUnionValueBuilder<D>> action)
        Description copied from interface: IValueConfigurator
        Execute the given action with this builder as a union value builder, if this builder is of that type. Does nothing otherwise.
        Specified by:
        whenUnion in interface IValueConfigurator
        Type Parameters:
        D - Type of the discriminating value.
        Parameters:
        discriminatorClass - Type of the discriminating value.
        action - Action to execute if this builder is of the desired type.
        Returns:
        getThis() builder instance to chain method calls.
      • whenVoid

        default IValueBuilder<T> whenVoid​(Consumer<? super IVoidValueBuilder> action)
        Description copied from interface: IValueConfigurator
        Execute the given action with this builder as a void value builder, if this builder is of that type. Does nothing otherwise.
        Specified by:
        whenVoid in interface IValueConfigurator
        Parameters:
        action - Action to execute if this builder is of the desired type.
        Returns:
        getThis() builder instance to chain method calls.
      • unwrap

        default <TItem,​TBuilder extends IValueBuilder<TItem>> TBuilder unwrap​(Class<? extends TBuilder> clazz)
        Description copied from interface: IValueConfigurator
        Casts this builder to the given type. Make sure you are certain it is of the given type.
        Specified by:
        unwrap in interface IValueConfigurator
        Type Parameters:
        TItem - Type of the values described by the descriptor.
        TBuilder - Type of the builder.
        Parameters:
        clazz - Class to which to cast this builder.
        Returns:
        getThis() value builder cast to the given type.
        See Also:
        IValueConfigurator.is(Class)
      • value

        IValueBuilder<T> value​(Object value)
        Description copied from interface: IValueConfigurator
        Applies the given value to this builder. Implementations are allowed to perform validity checks on the passed value and reject the given value or parts of it (in case of lists etc.) when they do not conform to the restrictions imposed by this builder.
        Specified by:
        value in interface IValueConfigurator
        Parameters:
        value - Sets the value created by this builder.
        Returns:
        getThis() builder instance for chaining method calls.