Package io.github.jwharm.javagi.base
Class Out<T>
java.lang.Object
io.github.jwharm.javagi.base.Out<T>
- Type Parameters:
T
- The parameter type.
A wrapper class for out-parameters of (usually primitive) values. When a
method expects an
Out<>
object, the user must create it, optionally
fill it with an initial value, and pass it to the method. After the method
has returned, the user can read the the value of the out-parameter with a
call to get()
.-
Constructor Summary
-
Method Summary
-
Constructor Details
-
Out
public Out()Create an Out object with no initial value. -
Out
Create an Out object and set the initial value.- Parameters:
value
- the initial value
-
-
Method Details
-
get
-
set
Set the parameter to the provided value.- Parameters:
value
- the value to set
-