001/*
002 * SPDX-FileCopyrightText: none
003 * SPDX-License-Identifier: CC0-1.0
004 */
005
006package dev.metaschema.core.model;
007
008/**
009 * Represents a model element that can contain child instances.
010 * <p>
011 * This interface is implemented by model definitions that may contain flags,
012 * fields, or assemblies as part of their structure.
013 */
014@FunctionalInterface
015public interface IContainer {
016  /**
017   * Identifies if the container allows child instances or not.
018   * <p>
019   * This can be the case if the container has flags or a complex model with at
020   * least a choice, choice group, field, or assembly instance.
021   *
022   * @return {@code true} if there are flags or a model, or {@code false}
023   *         otherwise
024   */
025  boolean hasChildren();
026}