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 public interface Enumeration extends GeneratedType {
21 * Returns list of annotation definitions associated with enumeration type.
23 * @return list of annotation definitions associated with enumeration type.
27 List<AnnotationType> getAnnotations();
33 * Returns list of the couples - name and value.
35 * @return list of the enumeration pairs.
37 List<Pair> getValues();
40 * Formats enumeration according to rules of the programming language.
42 * @return string with source code in some programming language
44 String toFormattedString();
47 * Interface is used for reading enumeration item. It means item's name and
50 interface Pair extends DocumentedNode {
53 * Returns the name of the enumeration item.
55 * @return the name of the enumeration item.
60 * Returns value of the enumeration item.
62 * @return the value of the enumeration item.