com.microsoft.bingads.internal.utilities.Lazy Maven / Gradle / Ivy
package com.microsoft.bingads.internal.utilities;
import java.util.function.Supplier;
public class Lazy {
private volatile T value;
private final Supplier createValue;
public Lazy(Supplier createValue) {
this.createValue = createValue;
}
public synchronized T getValue() {
if (value == null) {
value = createValue.get();
}
return value;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy