Package jmri
Class Reference<E>
java.lang.Object
jmri.Reference<E>
- Type Parameters:
E- the type of the reference
A reference to an object.
It's a faster replacement for AtomicReference when thread safety is not
needed.
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
Reference
public Reference()Create an instance of Reference. -
Reference
Create an instance of Reference.- Parameters:
ref- the reference
-
-
Method Details
-
set
Set the reference.- Parameters:
ref- the new reference
-
get
Return the reference.- Returns:
- the reference
-