Priyanka B
Committed by Gerrit Code Review

Route Identifier

Change-Id: I22a00f56998849e406481d816f09171212da932f
......@@ -15,6 +15,9 @@
*/
package org.onosproject.iptopology.api;
import java.util.HashMap;
import java.util.Map;
/**
* Abstraction of Router ID to identify the router with a distinct IP address.
*/
......@@ -35,6 +38,24 @@ public interface RouteIdentifier {
value = val;
}
static Map<Integer, ProtocolType> map = new HashMap<>();
static {
for (ProtocolType type : ProtocolType.values()) {
map.put(type.value, type);
}
}
/**
* A method that returns enum value.
*
* @param value protocol type
* @return Enum value
*/
public static ProtocolType getEnumType(int value) {
return map.get(value);
}
/**
* Provides Protocol ID.
*
......