001/*
002 * SPDX-FileCopyrightText: none
003 * SPDX-License-Identifier: CC0-1.0
004 */
005
006package dev.metaschema.core.model;
007
008import edu.umd.cs.findbugs.annotations.NonNull;
009
010/**
011 * Builder for constructing flag container instances.
012 * <p>
013 * This interface provides a fluent API for building flag containers by adding
014 * flag instances and then building the final container.
015 *
016 * @param <T>
017 *          the Java type of flag instances
018 */
019public interface IFlagContainerBuilder<T extends IFlagInstance> {
020  /**
021   * Add a flag instance to the flag container.
022   *
023   * @param instance
024   *          the flag instance to add
025   * @return this builder
026   */
027  @NonNull
028  IFlagContainerBuilder<T> flag(@NonNull T instance);
029
030  /**
031   * Build the flag container.
032   *
033   * @return the built flag container
034   */
035  @NonNull
036  IContainerFlagSupport<T> build();
037}