1   /*
2    * SPDX-FileCopyrightText: none
3    * SPDX-License-Identifier: CC0-1.0
4    */
5   
6   package gov.nist.secauto.metaschema.core.model;
7   
8   public interface IFlagInstance extends IFlag, IValuedInstance, IInstanceAbsolute {
9   
10    boolean DEFAULT_FLAG_REQUIRED = false;
11  
12    @Override
13    IModelDefinition getParentContainer();
14  
15    @Override
16    IFlagDefinition getDefinition();
17  
18    @Override
19    default IModelDefinition getContainingDefinition() {
20      return getParentContainer();
21    }
22  
23    /**
24     * Determines if a flag value is required to be provided.
25     *
26     * @return {@code true} if a value is required, or {@code false} otherwise
27     * @see #DEFAULT_FLAG_REQUIRED
28     */
29    default boolean isRequired() {
30      return DEFAULT_FLAG_REQUIRED;
31    }
32  }