Class AbstractContainerDefinitionBuilder<R extends ContainerDefinition,​T extends AbstractContainerDefinitionBuilder<R,​T>>

    • Constructor Detail

      • AbstractContainerDefinitionBuilder

        protected AbstractContainerDefinitionBuilder​(Supplier<R> provider)
        Initializes a builder.
        Parameters:
        provider - the provider of object to build, cannot be null.
    • Method Detail

      • insert

        protected T insert​(Supplier<? extends IDefinition> definitionProvider)
        Inserts the definition provided with definitionProvider in current position and increment the position.
        Parameters:
        definitionProvider - the provider of definition.
        Returns:
        the builder instance.
      • getPosition

        protected int getPosition()
        Returns the index of a child definition where the builder is positioned.
        Returns:
        the position.
      • getAndIncrementPosition

        protected int getAndIncrementPosition()
        Returns the index of a child definition where the builder is positioned and increment its position.
        Returns:
        the position.
      • setPosition

        protected void setPosition​(int index)
        Sets the current position to the given.
        Parameters:
        index - the current position.