Java tutorial
//package com.java2s; import static com.google.common.base.Objects.firstNonNull; import java.util.Locale; public class Main { public static final ThreadLocal<Locale> THREAD_LOCAL = new ThreadLocal<>(); public static Locale get() { return firstNonNull(THREAD_LOCAL.get(), Locale.getDefault()); } }