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 {
    public static <K> Map safeGetMap(Map<K, Object> map, K key) {
        if (map == null) {
            return null;
        } else {
            return map.containsKey(key) ? (Map) map.get(key) : null;
        }
    }
}