public class XLazy<T,X extends Exception> extends Object implements XSupplier<T,X>
Implements an XSupplier 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() throws X extends Exception
Returns the represented value.
That value was determined once with the first access using the originally defined initialization code.
Copyright © 2020. All rights reserved.