Package jetbrains.buildServer.util.impl
Class Lazy<T>
- java.lang.Object
-
- jetbrains.buildServer.util.impl.Lazy<T>
-
-
Constructor Summary
Constructors Constructor Description Lazy()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description static <T> Lazy<T>
create(Supplier<T> supplier)
Creates a new instance of Lazy object from the provided supplier.protected abstract T
createValue()
T
get()
T
getValue()
T
getValueIfInitialized()
void
resetValue()
-
-
-
Method Detail
-
createValue
@Nullable protected abstract T createValue()
-
getValue
public T getValue()
- Returns:
- current value or initializes it if it was not initialized yet
-
getValueIfInitialized
public T getValueIfInitialized()
- Returns:
- current value but only if it was initialized (i.e. if getValue() was called), otherwise returns null
-
resetValue
public void resetValue()
-
-