Package de.marcely.bedwars.tools
Class LazyReference<T>
java.lang.Object
de.marcely.bedwars.tools.LazyReference<T>
- Type Parameters:
T
- The type of the reference
Represents a lazy reference that will only be initialized when it's being accessed.
-
Constructor Summary
-
Method Summary
-
Constructor Details
-
LazyReference
Creates a new lazy reference.- Parameters:
factory
- The factory that will be called when the reference is being accessed
-
-
Method Details
-
get
Gets the reference.- Returns:
- The reference
- Throws:
IllegalStateException
- If the factory returns null
-