/* * Copyright (c) 2013 Cisco Systems, Inc. and others. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 which accompanies this distribution, * and is available at http://www.eclipse.org/legal/epl-v10.html */ package org.opendaylight.yangtools.yang.model.api.type; import java.util.List; import org.opendaylight.yangtools.yang.common.QName; import org.opendaylight.yangtools.yang.model.api.SchemaNode; import org.opendaylight.yangtools.yang.model.api.SchemaPath; import org.opendaylight.yangtools.yang.model.api.TypeDefinition; /** * * Makes is possible to access to the individual enumeration values of this * type. * */ public interface EnumTypeDefinition extends TypeDefinition { /** * Returns all enumeration values. * * @return list of EnumPair type instastances which contain the * data about all individual enumeration pairs of * enumeration YANG built-in type */ List getValues(); /** * * Contains the methods for accessing the data about the concrete * enumeration item which represents enum YANG type. */ interface EnumPair extends SchemaNode { /** * * @deprecated Enum pair SHOULD NOT have schema path, since it's argument is only string and * not QName. * */ @Deprecated @Override SchemaPath getPath(); /** * * @deprecated Enum pair SHOULD NOT have QName, since it's argument is only string (allows * characters not allowed in QName) and not QName. Use {@link #getName()} * instead. * */ @Deprecated @Override QName getQName(); /** * The name to specify each assigned name of an enumeration type. * * @return name of each assigned name of an enumeration type. */ String getName(); /** * The "value" statement, which is optional, is used to associate an * integer value with the assigned name for the enum. This integer value * MUST be in the range -2147483648 to 2147483647, and it MUST be unique * within the enumeration type. * * @return integer value assigned to enumeration */ Integer getValue(); } }