1
for nonempty Option's and 0
for empty.None
since it anyways cannot represent a state.Option.empty()
singleton
as it anyways cannot represent a value/state.true
as None is stateless comparing it to some other None is therefore always the same.false
.true
if this option is nonempty and the predicate p returns true
when applied to this Option's value.true
if the predicate matches the value.Failure
with an UnsupportedOperationException
.Try
.true
.false
.true
if the Option is nonempty and the predicate holds true
, else false
.Option.exists(Predicate)
.Throwable
provided in the constructor.NoSuchElementException
since None cannot hold any value.NoSuchElementException
is raised.0
as None is stateless and has no value.Some
.false
.true
.this
this
.Some
.Option
.this
.null
if it is empty.Success
, else null
.Option
holding a value.Try
.Copyright © 2015. All rights reserved.