X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=yang%2Fyang-model-api%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fyangtools%2Fyang%2Fmodel%2Fapi%2FTypeDefinition.java;h=8290e22622c88673f64e39158d09c972913baf55;hb=b4c4e3aa99c2c6306f4c8be211523308b2431930;hp=4ff709e1e4ba06a9f28e45d627b6bedbaecb7837;hpb=5c1f875f69e35248aa4115c429bd962160beeef4;p=yangtools.git diff --git a/yang/yang-model-api/src/main/java/org/opendaylight/yangtools/yang/model/api/TypeDefinition.java b/yang/yang-model-api/src/main/java/org/opendaylight/yangtools/yang/model/api/TypeDefinition.java index 4ff709e1e4..8290e22622 100644 --- a/yang/yang-model-api/src/main/java/org/opendaylight/yangtools/yang/model/api/TypeDefinition.java +++ b/yang/yang-model-api/src/main/java/org/opendaylight/yangtools/yang/model/api/TypeDefinition.java @@ -1,18 +1,58 @@ -/* - * Copyright (c) 2013 Cisco Systems, Inc. and others. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0 which accompanies this distribution, - * and is available at http://www.eclipse.org/legal/epl-v10.html - */ -package org.opendaylight.yangtools.yang.model.api; - - -public interface TypeDefinition> extends SchemaNode { - - T getBaseType(); - - String getUnits(); - - Object getDefaultValue(); -} +/* + * Copyright (c) 2013 Cisco Systems, Inc. and others. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v1.0 which accompanies this distribution, + * and is available at http://www.eclipse.org/legal/epl-v10.html + */ +package org.opendaylight.yangtools.yang.model.api; + +/** + * + * YANG statement typedef contains also substatements + * + * This interface contains the methods for getting the values of the arguments + * of substatements mentioned above. + * + * @param + * type of the base type (YANG type substatement) which + * is included in the instance of this type + */ +public interface TypeDefinition> extends SchemaNode { + + /** + * Returns the base type from which this type is derived. If this is yang + * built-in type, returns null. + * + * @return value of <T> type which represents the base + * type of instance of the TypeDefinition type or null, + * if this is yang built-in type + */ + T getBaseType(); + + /** + * Returns the unit which represents the value of the argument of the + * units substatement of the YANG typedef + * statement. + * + * @return string with units in which is type measured + */ + String getUnits(); + + /** + * Returns the default value which represents the value of the argument of + * the default substatement of the YANG typedef + * statement. + * + * @return instance of Object type which contains default value + * for typedef + */ + Object getDefaultValue(); +}