public class DatabaseRef<T extends NdNode>
extends java.lang.Object
implements java.util.function.Supplier<T>
| Constructor and Description |
|---|
DatabaseRef(Nd nd,
java.util.function.Supplier<T> searchFunction)
Constructs a new
DatabaseRef that will search for its target using the given search function. |
DatabaseRef(Nd nd,
java.util.function.Supplier<T> searchFunction,
T initialResult)
Constructs a new
DatabaseRef that will search for its target using the given search function. |
| Modifier and Type | Method and Description |
|---|---|
T |
get()
Returns the referenced object or null if the object is no longer present in the database.
|
Nd |
getNd() |
IReader |
lock()
Acquires a read lock.
|
public DatabaseRef(Nd nd, java.util.function.Supplier<T> searchFunction)
DatabaseRef that will search for its target using the given search function.public DatabaseRef(Nd nd, java.util.function.Supplier<T> searchFunction, T initialResult)
DatabaseRef that will search for its target using the given search function.