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   import java.util.Map;
10  
11  import javax.xml.namespace.QName;
12  
13  import edu.umd.cs.findbugs.annotations.NonNull;
14  
15  public interface IFeatureValueConstrained extends IValueConstrained {
16    /**
17     * Lazy initialize the instances for the constraints when the constraints are
18     * first accessed.
19     *
20     * @return the constraints instance
21     */
22    @NonNull
23    IValueConstrained getConstraintSupport();
24  
25    @Override
26    default ILet addLetExpression(ILet let) {
27      return getConstraintSupport().addLetExpression(let);
28    }
29  
30    @Override
31    default Map<QName, ILet> getLetExpressions() {
32      return getConstraintSupport().getLetExpressions();
33    }
34  
35    @Override
36    default List<? extends IConstraint> getConstraints() {
37      return getConstraintSupport().getConstraints();
38    }
39  
40    @Override
41    default List<? extends IAllowedValuesConstraint> getAllowedValuesConstraints() {
42      return getConstraintSupport().getAllowedValuesConstraints();
43    }
44  
45    @Override
46    default List<? extends IMatchesConstraint> getMatchesConstraints() {
47      return getConstraintSupport().getMatchesConstraints();
48    }
49  
50    @Override
51    default List<? extends IIndexHasKeyConstraint> getIndexHasKeyConstraints() {
52      return getConstraintSupport().getIndexHasKeyConstraints();
53    }
54  
55    @Override
56    default List<? extends IExpectConstraint> getExpectConstraints() {
57      return getConstraintSupport().getExpectConstraints();
58    }
59  
60    @Override
61    default void addConstraint(IAllowedValuesConstraint constraint) {
62      getConstraintSupport().addConstraint(constraint);
63    }
64  
65    @Override
66    default void addConstraint(IMatchesConstraint constraint) {
67      getConstraintSupport().addConstraint(constraint);
68    }
69  
70    @Override
71    default void addConstraint(IIndexHasKeyConstraint constraint) {
72      getConstraintSupport().addConstraint(constraint);
73    }
74  
75    @Override
76    default void addConstraint(@NonNull IExpectConstraint constraint) {
77      getConstraintSupport().addConstraint(constraint);
78    }
79  }