mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-01 12:50:56 +07:00
18 lines
270 B
Java
18 lines
270 B
Java
import java.util.function.Supplier;
|
|
|
|
class LazyVal<T> {
|
|
public LazyVal(Supplier<T> supplier) {}
|
|
public LazyVal(T value) {}
|
|
}
|
|
|
|
class Sample {
|
|
|
|
String getString() {
|
|
return "";
|
|
}
|
|
|
|
public void usage() {
|
|
new LazyVal<>(() -> new Sample().getString());
|
|
}
|
|
}
|