Sudhir Singh Khanger
07/20/2018, 1:20 PMprivate static final Object LOCK = new Object();
private static SomeClass sInstance;
public static SomeClass getInstance(ClassA classA) {
if (sInstance == null) {
synchronized (LOCK) {
sInstance = new SomeClass(ClassA classA);
}
}
return sInstance;
}
What is Kotlin equivalent of the getInstance()
method?