2 * Copyright (c) 2015 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
8 package org.opendaylight.yangtools.yang.model.api.stmt;
10 import java.util.Collection;
11 import javax.annotation.Nonnull;
12 import javax.annotation.Nullable;
13 import org.opendaylight.yangtools.yang.common.QName;
14 import org.opendaylight.yangtools.yang.model.api.meta.DeclaredStatement;
16 @Rfc6020AbnfRule("type-stmt")
17 public interface TypeStatement extends DeclaredStatement<QName> {
19 @Nonnull String getName();
21 @Rfc6020AbnfRule("numerical-restrictions")
22 interface NumericalRestrictions extends TypeStatement {
24 @Nonnull RangeStatement getRange();
28 @Rfc6020AbnfRule("decimal64-specification")
29 interface Decimal64Specification extends TypeStatement {
31 @Nonnull FractionDigitsStatement getFractionDigits();
33 @Nullable RangeStatement getRange();
37 @Rfc6020AbnfRule("string-restrictions")
38 interface StringRestrictions extends TypeStatement {
40 @Nullable LengthStatement getLength();
42 @Nonnull Collection<? extends PatternStatement> getPatterns();
45 @Rfc6020AbnfRule("enum-specification")
46 interface EnumSpecification extends TypeStatement {
48 @Nonnull Collection<? extends EnumStatement> getEnums();
52 @Rfc6020AbnfRule("leafref-specification")
53 interface LeafrefSpecification extends TypeStatement {
55 @Nullable PathStatement getPath();
59 interface InstanceIdentifierSpecification extends TypeStatement {
61 @Nullable RequireInstanceStatement getRequireInstance();
65 interface IdentityRefSpecification extends TypeStatement {
68 interface BitsSpecification extends TypeStatement {
70 @Nonnull Collection<? extends BitStatement> getBits();
74 interface UnionSpecification extends TypeStatement {
76 @Nonnull Collection<? extends TypeStatement> getTypes();