2 * Copyright © 2017 Orange, 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.transportpce.stubpce;
14 * Enum class to identify ServiceAEnd and serviceZEnd.
16 * @author Martial Coulibaly ( martial.coulibaly@gfi.com ) on behalf of Orange
24 private static final Map<Integer, MyEndpoint> VALUE_MAP;
26 MyEndpoint(int value) {
31 final com.google.common.collect.ImmutableMap.Builder<java.lang.Integer, MyEndpoint> b =
32 com.google.common.collect.ImmutableMap.builder();
33 for (MyEndpoint enumItem : MyEndpoint.values()) {
34 b.put(enumItem.value, enumItem);
37 VALUE_MAP = b.build();
43 * @return integer value.
45 public int getIntValue() {
53 * Integer to identify Enum
54 * @return corresponding ServiceFormat item
56 public static MyEndpoint forValue(int valueArg) {
57 return VALUE_MAP.get(valueArg);