Optional objects

Back to Data structures

An optional object is an object which either contains another object or not. The optional object can be queried about the state of containment. When the optional object contains an object, all the operations are redirected to the underlying object.

Files

Optional module

Optional object

Testing for optional objects