2 * Copyright (c) 2016 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
9 package org.opendaylight.mdsal.binding2.model.api;
11 import com.google.common.annotations.Beta;
12 import java.util.List;
13 import org.opendaylight.yangtools.yang.model.api.DocumentedNode;
17 * Interface provide methods for reading data of enumeration class.
21 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 {
56 * Returns the name of the enumeration item.
58 * @return the name of the enumeration item.
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.