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

java.lang.Object
com._1c.g5.aef2.standard.definitions.builders.AbstractBuilder<R,T>
com._1c.g5.aef2.standard.definitions.builders.AbstractContainerDefinitionBuilder<R,T>
Type Parameters:
R - the container definition type.
T - the type of the builder.
Direct Known Subclasses:
DtGranularEditorPageSingleColumnBuilder, ManagingDefinitionBuilder, SectionDefinitionBuilder

public abstract class AbstractContainerDefinitionBuilder<R extends ContainerDefinition,T extends AbstractContainerDefinitionBuilder<R,T>> extends AbstractBuilder<R,T>
  • Constructor Details

    • AbstractContainerDefinitionBuilder

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

    • 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.