*/
package org.opendaylight.yangtools.yang.model.api;
+import org.opendaylight.yangtools.yang.model.api.stmt.MustEffectiveStatement;
+import org.opendaylight.yangtools.yang.xpath.api.YangXPathExpression.QualifiedBound;
+
/**
- *
* Contains methods for accessing constraint declaration for valid data in form
* of XPath expressions.<br>
* <br>
* <code>must "ifType != 'ethernet' or (ifType = 'ethernet' and ifMTU = 1500)";</code>
* </i>
*/
-public interface MustDefinition extends ConstraintMetaDefinition {
-
+public interface MustDefinition extends ConstraintMetaDefinition, EffectiveStatementEquivalent<MustEffectiveStatement> {
/**
* Returns XPath expression which contains constraint.
*
- * @return XPath expression which represents the value of the argument of
- * the <code>must</code> YANG substatement
+ * @return XPath expression which represents the value of the argument of the <code>must</code> YANG substatement.
*/
- RevisionAwareXPath getXpath();
+ default QualifiedBound getXpath() {
+ return asEffectiveStatement().argument();
+ }
}