public class Lazy<T> extends Object implements SdkAutoCloseable
getValue()
is invoked.
This should be close()
d if the initializer returns value that needs to be AutoCloseable.close()
d.Modifier and Type | Method and Description |
---|---|
void |
close() |
T |
getValue() |
boolean |
hasValue() |
String |
toString() |
static <T> Lazy<T> |
withValue(T initialValue) |
public static <T> Lazy<T> withValue(T initialValue)
public boolean hasValue()
public T getValue()
public void close()
SdkAutoCloseable
close
in interface AutoCloseable
close
in interface SdkAutoCloseable
Copyright © 2022. All rights reserved.