2 * Copyright (c) 2013 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;
12 * YANG statement <code>typedef</code> contains also substatements
14 * <li><code>default</code> - default value which is compatible with
15 * <code>type</code>,</li>
16 * <li><code>type</code> - base type from which is <code>typedef</code> derived,
18 * <li><code>units</code> - textual information about units associated with this
21 * This interface contains the methods for getting the values of the arguments
22 * of substatements mentioned above.
25 * type of the base type (YANG <code>type</code> substatement) which
26 * is included in the instance of this type
28 public interface TypeDefinition<T extends TypeDefinition<?>> extends SchemaNode {
31 * Returns the base type from which this type is derived. If this is yang
32 * built-in type, returns null.
34 * @return value of <code><T></code> type which represents the base
35 * type of instance of the <code>TypeDefinition</code> type or null,
36 * if this is yang built-in type
41 * Returns the unit which represents the value of the argument of the
42 * <code>units</code> substatement of the YANG <code>typedef</code>
45 * @return string with units in which is type measured
50 * Returns the default value which represents the value of the argument of
51 * the <code>default</code> substatement of the YANG <code>typedef</code>
54 * @return instance of <code>Object</code> type which contains default value
55 * for <code>typedef</code>
57 Object getDefaultValue();