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 static final ThreadLocal<Map<Object, Object>> LOCAL_CACHE = new ThreadLocal<Map<Object, Object>>();

    public static final boolean containsValue(Object key) {
        Map<Object, Object> cache = LOCAL_CACHE.get();
        return cache != null && cache.containsValue(key);
    }

    public static final Object get(Object key) {
        Map<Object, Object> cache = LOCAL_CACHE.get();
        return cache == null ? null : cache.get(key);
    }
}