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 * Represents an assembly instance that appears within a choice or other
012 * grouping construct.
013 * <p>
014 * Grouped assembly instances inherit cardinality from their containing group.
015 */
016public interface IAssemblyInstanceGrouped extends INamedModelInstanceGrouped, IAssemblyInstance {
017
018  /**
019   * A visitor callback.
020   *
021   * @param <CONTEXT>
022   *          the type of the context parameter
023   * @param <RESULT>
024   *          the type of the visitor result
025   * @param visitor
026   *          the calling visitor
027   * @param context
028   *          a parameter used to pass contextual information between visitors
029   * @return the visitor result
030   */
031  @Override
032  default <CONTEXT, RESULT> RESULT accept(@NonNull IModelElementVisitor<CONTEXT, RESULT> visitor, CONTEXT context) {
033    return visitor.visitAssemblyInstance(this, context);
034  }
035}