1   /*
2    * SPDX-FileCopyrightText: none
3    * SPDX-License-Identifier: CC0-1.0
4    */
5   
6   package gov.nist.secauto.metaschema.core.model.constraint;
7   
8   import java.util.List;
9   
10  import edu.umd.cs.findbugs.annotations.NonNull;
11  
12  public interface IFeatureModelConstrained extends IModelConstrained, IFeatureValueConstrained {
13    @Override
14    IModelConstrained getConstraintSupport();
15  
16    @Override
17    default List<? extends IIndexConstraint> getIndexConstraints() {
18      return getConstraintSupport().getIndexConstraints();
19    }
20  
21    @Override
22    default List<? extends IUniqueConstraint> getUniqueConstraints() {
23      return getConstraintSupport().getUniqueConstraints();
24    }
25  
26    @Override
27    default List<? extends ICardinalityConstraint> getHasCardinalityConstraints() {
28      return getConstraintSupport().getHasCardinalityConstraints();
29    }
30  
31    @Override
32    default void addConstraint(@NonNull IIndexConstraint constraint) {
33      getConstraintSupport().addConstraint(constraint);
34    }
35  
36    @Override
37    default void addConstraint(@NonNull IUniqueConstraint constraint) {
38      getConstraintSupport().addConstraint(constraint);
39    }
40  
41    @Override
42    default void addConstraint(@NonNull ICardinalityConstraint constraint) {
43      getConstraintSupport().addConstraint(constraint);
44    }
45  }