public class Lazy<T> extends Object implements Supplier<T>
Implements a Supplier that provides a virtually fixed value.
This value is only actually determined when it is accessed for the first time.
This implementation ensures that the originally defined initialization code is called at most once, even when there is concurrent access from multiple threads.
public final T get()
Returns the represented value.
That value was determined once with the first access using the originally defined initialization code.
Copyright © 2020. All rights reserved.