A common alternative to using this class is to find or create a suitable null object for the type in question.
This class is not intended as a direct analogue of any existing "option" or "maybe" construct from other programming environments, though it may bear some similarities.
@param < T> the type of instance that can be contained. {@code Optional} is naturallycovariant on this type, so it is safe to cast an {@code Optional} for any supertype {@code S} of {@code T}.
@author Kurt Alfred Kluever
@author Kevin Bourrillion
@since Guava release 10
|
|
|
|
|
|
|
|
|
|
|
|