mirror of
https://github.com/Pinball3D/Rabbit-R1.git
synced 2024-12-27 01:22:33 -06:00
23 lines
531 B
Java
23 lines
531 B
Java
package io.sentry.util;
|
|
|
|
/* loaded from: classes3.dex */
|
|
public final class LazyEvaluator<T> {
|
|
private final Evaluator<T> evaluator;
|
|
private T value = null;
|
|
|
|
/* loaded from: classes3.dex */
|
|
public interface Evaluator<T> {
|
|
T evaluate();
|
|
}
|
|
|
|
public LazyEvaluator(Evaluator<T> evaluator) {
|
|
this.evaluator = evaluator;
|
|
}
|
|
|
|
public synchronized T getValue() {
|
|
if (this.value == null) {
|
|
this.value = this.evaluator.evaluate();
|
|
}
|
|
return this.value;
|
|
}
|
|
}
|