
com.daredayo.util.collection.SingletonCache Maven / Gradle / Ivy
package com.daredayo.util.collection;
public abstract class SingletonCache{
T singleton;
public synchronized T get(){
if(singleton == null){
singleton = create();
}
return singleton;
}
public abstract T create();
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy