T - The Content typepublic final class Lazy<T>
extends java.lang.Object
| Constructor and Description |
|---|
Lazy(java.util.function.Supplier<? extends T> supplier)
Creates a new lazy instance based on the provided supplier method
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object o) |
T |
get()
Retrieves the value and calculates it when required
|
int |
hashCode() |
boolean |
isInitialised()
Indicates whether or not the value has already been initialised.
|
public Lazy(java.util.function.Supplier<? extends T> supplier)
supplier - the supplier to evaluate when first requiring a valuepublic T get()
public boolean isInitialised()
true if the value is already initialised, false
otherwise.public boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.ObjectCopyright © 2018. All Rights Reserved.