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;
14 import sun.reflect.annotation.AnnotationType;
18 * Interface provide methods for reading data of enumeration class.
22 public interface Enumeration extends GeneratedType {
25 * Returns list of annotation definitions associated with enumeration type.
27 * @return list of annotation definitions associated with enumeration type.
31 List<AnnotationType> getAnnotations();
37 * Returns list of the couples - name and value.
39 * @return list of the enumeration pairs.
41 List<Pair> getValues();
44 * Formats enumeration according to rules of the programming language.
46 * @return string with source code in some programming language
48 String toFormattedString();
51 * Interface is used for reading enumeration item. It means item's name and
54 interface Pair extends DocumentedNode {
57 * Returns the name of the enumeration item.
59 * @return the name of the enumeration item.
64 * Returns value of the enumeration item.
66 * @return the value of the enumeration item.