Package com.bytedesk.call.mrcp4j.util
Class ObjectWrapper<O>
java.lang.Object
com.bytedesk.call.mrcp4j.util.ObjectWrapper<O>
- Type Parameters:
O- type of the object being wrapped
Utility class for wrapping object references. The primary purpose of this class
is to allow for null values to be passed to methods that may not accept null values.
For example posting a null value to a
java.util.concurrent.BlockingQueue.- Author:
- Niels Godfredsen <ngodfredsen@users.sourceforge.net>
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionObjectWrapper(O obj) Constructs an instance that wraps the specified object. -
Method Summary
-
Field Details
-
_obj
-
-
Constructor Details
-
ObjectWrapper
Constructs an instance that wraps the specified object.- Parameters:
obj- object to be wrapped. Null values allowed.
-
-
Method Details
-
getObject
Gets the object wrapped by this instance.- Returns:
- the wrapped object or null if this instance wraps a null.
-