T
- The type of the valuepublic interface NonNullLazy<T> extends NonNullSupplier<T>
Lazy
, but with a nonnull contract.修飾子とタイプ | インタフェースと説明 |
---|---|
static class |
NonNullLazy.Concurrent<T>
Thread-safe implementation.
|
static class |
NonNullLazy.Fast<T>
Non-thread-safe implementation.
|
修飾子とタイプ | メソッドと説明 |
---|---|
static <T> NonNullLazy<T> |
concurrentOf(NonNullSupplier<T> supplier)
Constructs a thread-safe lazy-initialized object
|
static <T> NonNullLazy<T> |
of(NonNullSupplier<T> supplier)
Constructs a lazy-initialized object
|
get
static <T> NonNullLazy<T> of(@Nonnull NonNullSupplier<T> supplier)
supplier
- The supplier for the value, to be called the first time the value is needed.static <T> NonNullLazy<T> concurrentOf(@Nonnull NonNullSupplier<T> supplier)
supplier
- The supplier for the value, to be called the first time the value is needed.