Package org.agrona.collections
Class MutableReference<T>
java.lang.Object
org.agrona.collections.MutableReference<T>
- Type Parameters:
T
- type of the reference.
Mutable reference that is useful for capturing an object reference when using lambdas.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor.MutableReference
(T ref) Set the reference at construction. -
Method Summary
-
Field Details
-
ref
For convenient access.
-
-
Constructor Details
-
MutableReference
public MutableReference()Default constructor. -
MutableReference
Set the reference at construction.- Parameters:
ref
- to be set.
-
-
Method Details
-
get
Get the current value of the reference.- Returns:
- the current value of the reference.
-
set
Set the current value of the reference.- Parameters:
ref
- to be set.
-
equals
-
hashCode
public int hashCode() -
toString
-