Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
import java.util.Map;

public class Main {
    private final static ThreadLocal<Map<String, Object>> wfThreadLocal = new ThreadLocal<Map<String, Object>>();

    public static void clear() {
        Map<String, Object> map = wfThreadLocal.get();
        if (map != null) {
            map.clear();
        }
    }

    public static Object get(String key) {

        Map<String, Object> map = wfThreadLocal.get();
        if (map == null) {
            return null;
        }

        return map.get(key);
    }
}