Initial opendaylight infrastructure commit!!
[controller.git] / opendaylight / sal / yang-prototype / yang / yang-model-api / src / main / java / org / opendaylight / controller / model / api / type / EnumTypeDefinition.java
1 /*\r
2  * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.\r
3  *\r
4  * This program and the accompanying materials are made available under the\r
5  * terms of the Eclipse Public License v1.0 which accompanies this distribution,\r
6  * and is available at http://www.eclipse.org/legal/epl-v10.html\r
7  */\r
8 package org.opendaylight.controller.model.api.type;\r
9 \r
10 import java.util.List;\r
11 \r
12 import org.opendaylight.controller.yang.model.api.SchemaNode;\r
13 import org.opendaylight.controller.yang.model.api.TypeDefinition;\r
14 \r
15 public interface EnumTypeDefinition extends TypeDefinition<EnumTypeDefinition> {\r
16 \r
17     List<EnumPair> getValues();\r
18 \r
19     interface EnumPair extends SchemaNode {\r
20 \r
21         /**\r
22          * The name to specify each assigned name of an enumeration type.\r
23          * \r
24          * @return name of each assigned name of an enumeration type.\r
25          */\r
26         public String getName();\r
27 \r
28         /**\r
29          * The "value" statement, which is optional, is used to associate an\r
30          * integer value with the assigned name for the enum. This integer value\r
31          * MUST be in the range -2147483648 to 2147483647, and it MUST be unique\r
32          * within the enumeration type.\r
33          * \r
34          * @return integer value assigned to enumeration\r
35          */\r
36         public Integer getValue();\r
37     }\r
38 }\r