externalOptional
Index
Methods
Methods
externalisPresent
Returns an
Answerable
that resolves totrue
when the optional value is present,false
otherwise.Returns Answerable<boolean>
Returns an Answerable
that resolves to true
when the optional value
is present, false
otherwise.
Optional
is a container object, which holds a value that may or may not be "present",The meaning of being "present" depends on the context and typically means a value that:
null
orundefined
Additionally,
Optional
can also have a context-specific meaning. For example,Optional#isPresent()
:PageElement
means that the element exists in the DOM.ModalWindow
means that the modal window is open.LastResponse.body().books[0].author.name.isPresent()
will inform us if a given entry exists (sobooks[0].author.name
), and if all the links of the property chain leading to the entry of interest exist too (sobooks
is present, and so isbooks[0]
,books[0].author
,books[0].author.name
).