trait Existence[-S] extends AnyRef
Supertrait for typeclasses that enable the exist
matcher syntax.
An Existence[S]
provides access to the "existence nature" of type S
in such
a way that exist
matcher syntax can be used with type S
. A S
can be any type for which the concept of existence makes sense, such as java.io.File
. ScalaTest provides
implicit implementations for java.io.File
. You can enable the exist
matcher syntax on your own
type U
by defining a Existence[U]
for the type and making it available implicitly.
ScalaTest provides an implicit Existence
instance for java.io.File
in the Existence
companion object.
- Source
- Existence.scala
- Alphabetic
- By Inheritance
- Existence
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Abstract Value Members
-
abstract
def
exists(thing: S): Boolean
Determines whether the passed thing exists, i.e., whether the passed
java.io.File
exists.Determines whether the passed thing exists, i.e., whether the passed
java.io.File
exists.- thing
the thing to check for existence
- returns
true
if passed thing exists,false
otherwise