BUG-6533: add immutable implementations of yang.model.api
[yangtools.git] / yang / yang-model-api / src / main / java / org / opendaylight / yangtools / yang / model / api / type / DecimalTypeDefinition.java
1 /*
2  * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.
3  *
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
7  */
8 package org.opendaylight.yangtools.yang.model.api.type;
9
10 import java.util.List;
11 import javax.annotation.Nonnull;
12 import org.opendaylight.yangtools.yang.model.api.TypeDefinition;
13
14 /**
15  * Contains methods for getting data from the YANG <code>type</code>
16  * substatement for <code>decimal64</code> built-in type.
17  */
18 public interface DecimalTypeDefinition extends TypeDefinition<DecimalTypeDefinition> {
19
20     /**
21      * Returns range constraints for instance of this type.
22      *
23      * @return list of range constraints which are specified as the argument of
24      *         the <code>range</code> which is substatement of the
25      *         <code>type</code> statement
26      */
27     @Nonnull List<RangeConstraint> getRangeConstraints();
28
29     /**
30      * Returns integer between 1 and 18 inclusively. <br>
31      * <br>
32      *
33      * The "fraction-digits" statement controls the size of the minimum
34      * difference between values of a decimal64 type, by restricting the value
35      * space to numbers that are expressible as "i x 10^-n" where n is the
36      * fraction-digits argument.
37      *
38      * @return number of fraction digits
39      */
40     @Nonnull Integer getFractionDigits();
41 }