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;
13 * Interface provide methods for reading data of enumeration class.
15 public interface Enumeration extends Type {
19 * Returns list of annotation definitions associated with enumeration type.
21 * @return list of annotation definitions associated with enumeration type.
24 public List<AnnotationType> getAnnotations();
26 public Type getDefiningType();
29 * Returns list of the couples - name and value.
31 * @return list of the enumeration pairs.
33 public List<Pair> getValues();
36 * Formats enumeration according to rules of the programming language.
38 * @return string with source code in some programming language
40 public String toFormattedString();
43 * Interface is used for reading enumeration item. It means item's name and
49 * Returns the name of the enumeration item.
51 * @return the name of the enumeration item.
53 public String getName();
56 * Returns value of the enumeration item.
58 * @return the value of the enumeration item.
60 public Integer getValue();