+++ /dev/null
-@*
- * Copyright (c) 2016 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
- *@
-
-@import org.opendaylight.mdsal.binding.javav2.java.api.generator.renderers.EnumRenderer.writeEnumeration
-@import org.opendaylight.mdsal.binding.javav2.java.api.generator.util.TextTemplateUtil.formatDataForJavaDoc
-@import org.opendaylight.mdsal.binding.javav2.java.api.generator.util.TextTemplateUtil.wrapToDocumentation
-@import org.opendaylight.mdsal.binding.javav2.model.api.Enumeration
-@import org.opendaylight.mdsal.binding.javav2.model.api.GeneratedType
-
-@(genType: GeneratedType, importedName: String)
-@if(genType != null) {
-@{wrapToDocumentation(formatDataForJavaDoc(genType))}
-public enum @{genType.getName} {
-@{writeEnumeration(genType.asInstanceOf[Enumeration])}
-
- @{importedName} name;
- int value;
- private static final java.util.Map<java.lang.Integer, @{genType.getName}> VALUE_MAP;
-
- static {
- final com.google.common.collect.ImmutableMap.Builder<java.lang.Integer, @{genType.getName}> b = com.google.common.collect.ImmutableMap.builder();
- for (@{genType.getName} enumItem : @{genType.getName}.values())
- {
- b.put(enumItem.value, enumItem);
- }
-
- VALUE_MAP = b.build();
- }
-
- private @{genType.getName}(int value, @{importedName} name) {
- this.value = value;
- this.name = name;
- }
-
- /**
- * Returns the name of the enumeration item as it is specified in the input yang.
- *
- * @@return the name of the enumeration item as it is specified in the input yang
- */
- public @{importedName} getName() {
- return name;
- }
-
- /**
- * @@return integer value
- */
- public int getIntValue() {
- return value;
- }
-
- /**
- * @@param valueArg
- * @@return corresponding @{genType.getName} item
- */
- public static @{genType.getName} forValue(int valueArg) {
- return VALUE_MAP.get(valueArg);
- }
-}
-}
\ No newline at end of file