Modidy a package name of nemo
[nemo.git] / nemo-tools / eclipse-plugin / nemo-rest / org.opendaylight.nemo.tool.eclipse.plugin.rest / src / org / opendaylight / nemo / tool / eclipse / plugin / rest / actions / UUIDUtils.java
1 package org.opendaylight.nemo.tool.eclipse.plugin.rest.actions;
2
3
4 import java.util.HashMap;
5 import java.util.UUID;
6
7 /**
8  * Created by hj on 10/29/15.
9  * Not concurrent safe.
10  */
11 public class UUIDUtils {
12     private static HashMap<String/**/,String/*uuid*/> uuidMap = new HashMap<String, String>();
13
14     public static String getUUId(String name){
15         if(!uuidMap.containsKey(name)){
16             uuidMap.put(name, UUID.randomUUID().toString());
17         }
18         return uuidMap.get(name);
19         
20     }
21 }