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.mdsal.binding.model.api;
10 import java.util.List;
11 import org.opendaylight.yangtools.yang.model.api.DocumentedNode;
14 * Interface provide methods for reading data of enumeration class.
16 public interface Enumeration extends GeneratedType {
18 * Returns list of the couples - name and value.
20 * @return list of the enumeration pairs.
22 List<Pair> getValues();
25 * Formats enumeration according to rules of the programming language.
27 * @return string with source code in some programming language
29 String toFormattedString();
32 * Interface is used for reading enumeration item. It means item's name and its value.
34 interface Pair extends DocumentedNode.WithStatus {
36 * Returns the name of the enumeration item as it is specified in the input YANG.
38 * @return the name of the enumeration item as it is specified in the input YANG.
43 * Returns the binding representation for the name of the enumeration item.
45 * @return the binding representation for the name of the enumeration item.
47 String getMappedName();
50 * Returns value of the enumeration item.
52 * @return the value of the enumeration item.