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.sal.binding.model.api;
10 import java.util.List;
12 import org.opendaylight.yangtools.yang.model.api.DocumentedNode;
15 * Interface provide methods for reading data of enumeration class.
17 * @deprecated Use {@link org.opendaylight.mdsal.binding.model.api.Enumeration} instead.
20 public interface Enumeration extends GeneratedType {
24 * Returns list of annotation definitions associated with enumeration type.
26 * @return list of annotation definitions associated with enumeration type.
30 List<AnnotationType> getAnnotations();
36 * Returns list of the couples - name and value.
38 * @return list of the enumeration pairs.
40 List<Pair> getValues();
43 * Formats enumeration according to rules of the programming language.
45 * @return string with source code in some programming language
47 String toFormattedString();
50 * Interface is used for reading enumeration item. It means item's name and
53 interface Pair extends DocumentedNode.WithStatus {
56 * Returns the name of the enumeration item as it is specified in the input yang.
58 * @return the name of the enumeration item as it is specified in the input yang.
63 * Returns the binding representation for the name of the enumeration item.
65 * @return the binding representation for the name of the enumeration item.
67 String getMappedName();
70 * Returns value of the enumeration item.
72 * @return the value of the enumeration item.