File
Doc
Category
Size
Date
Package
Singleton.java
API Doc
Android 5.1 API
1072
Thu Mar 12 22:22:10 GMT 2015
android.util
Singleton
java.lang.Object
public abstract class Singleton extends Object
Singleton helper class for lazily initialization. Modeled after frameworks/base/include/utils/Singleton.h
hide
Fields Summary
private T
mInstance
Constructors Summary
Methods Summary
protected abstract
T
create
()
public final
T
get
()
synchronized (this) { if (mInstance == null) { mInstance = create(); } return mInstance; }
Java Code Source