2 * Copyright (c) 2016 Cisco Systems, Inc. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
9 package org.opendaylight.yangtools.yang.model.api.stmt;
11 import static com.google.common.base.Verify.verifyNotNull;
13 import com.google.common.annotations.Beta;
14 import org.eclipse.jdt.annotation.NonNull;
15 import org.opendaylight.yangtools.yang.model.api.YangStmtMapping;
16 import org.opendaylight.yangtools.yang.model.api.meta.DeclaredStatement;
17 import org.opendaylight.yangtools.yang.model.api.meta.StatementDefinition;
18 import org.opendaylight.yangtools.yang.model.api.type.ModifierKind;
21 * Represents YANG modifier statement.
24 * The "modifier" statement, which is an optional substatement to the "pattern" statement, takes as an argument
25 * the string "invert-match". If a pattern has the "invert-match" modifier present, the type is restricted to values
26 * that do not match the pattern.
29 public interface ModifierStatement extends DeclaredStatement<ModifierKind> {
31 default StatementDefinition statementDefinition() {
32 return YangStmtMapping.MODIFIER;
35 default @NonNull ModifierKind getValue() {
36 // FIXME: YANGTOOLS-908: verifyNotNull() should not be needed here
37 return verifyNotNull(argument());