本文整理了Java中java.lang.ThreadLocal.initialValue()
方法的一些代码示例,展示了ThreadLocal.initialValue()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ThreadLocal.initialValue()
方法的具体详情如下:
包路径:java.lang.ThreadLocal
类名称:ThreadLocal
方法名:initialValue
[英]Provides the initial value of this variable for the current thread. The default implementation returns null.
[中]为当前线程提供此变量的初始值。默认实现返回null。
代码示例来源:origin: robovm/robovm
Object value = key.initialValue();
Object value = key.initialValue();
代码示例来源:origin: dragome/dragome-sdk
public T get()
{
if (value == null)
value= initialValue();
return value;
}
代码示例来源:origin: org.apidesign.bck2brwsr/emul.mini
/**
* Variant of set() to establish initialValue. Used instead
* of set() in case user has overridden the set() method.
*
* @return the initial value
*/
private T setInitialValue() {
T v = initialValue();
this.value = v;
return v;
}
代码示例来源:origin: net.sf.sf3jswing/kernel-core
@Override
protected D initialValue() {
return data == null ? super.initialValue() : data;
}
};
代码示例来源:origin: jtulach/bck2brwsr
/**
* Variant of set() to establish initialValue. Used instead
* of set() in case user has overridden the set() method.
*
* @return the initial value
*/
private T setInitialValue() {
T v = initialValue();
this.value = v;
return v;
}
代码示例来源:origin: dragome/dragome-sdk
public ThreadLocal()
{
value= initialValue();
}
代码示例来源:origin: com.jtransc/jtransc-rt
private long initializeOnce() {
long id = Thread.currentThread().getId();
if (!initialized.contains(id)) {
initialized.add(id);
valuesPerThread.put(id, initialValue());
}
return id;
}
代码示例来源:origin: com.bugvm/bugvm-rt
Object value = key.initialValue();
Object value = key.initialValue();
代码示例来源:origin: MobiVM/robovm
Object value = key.initialValue();
Object value = key.initialValue();
代码示例来源:origin: ibinti/bugvm
Object value = key.initialValue();
Object value = key.initialValue();
代码示例来源:origin: FlexoVM/flexovm
Object value = key.initialValue();
Object value = key.initialValue();
代码示例来源:origin: com.gluonhq/robovm-rt
Object value = key.initialValue();
Object value = key.initialValue();
代码示例来源:origin: com.mobidevelop.robovm/robovm-rt
Object value = key.initialValue();
Object value = key.initialValue();
内容来源于网络,如有侵权,请联系作者删除!