Top Description Constructors Methods
org.apache.avro.util.internal

public Class ThreadLocalWithInitial

extends Object
Class Inheritance
Imports
java.util.function.Supplier

Wraps a ThreadLocal#withInitial(Supplier) so it can be overridden in an android environment, where this method is not available until API 26.

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public static <T> ThreadLocal<T>
of(Supplier<? extends T> supplier)

Delegate a ThreadLocal instance with the supplier.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

ThreadLocalWithInitialback to summary
public ThreadLocalWithInitial()

Method Detail

ofback to summary
public static <T> ThreadLocal<T> of(Supplier<? extends T> supplier)

Delegate a ThreadLocal instance with the supplier.