implicit final class ApsoCloseable[U <: AutoCloseable] extends AnyVal
Implicit class that provides new methods for closeable resources.
Linear Supertypes
Ordering
- Alphabetic
- By Inheritance
Inherited
- ApsoCloseable
- AnyVal
- Any
- Hide All
- Show All
Visibility
- Public
- All
Instance Constructors
-
new
ApsoCloseable(res: U)
- res
the closeable resource to which the new methods are provided.
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- Any
-
final
def
##(): Int
- Definition Classes
- Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
getClass(): Class[_ <: AnyVal]
- Definition Classes
- AnyVal → Any
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- val res: U
-
def
toString(): String
- Definition Classes
- Any
-
def
use[T](f: (U) ⇒ T): T
Uses this resouce and closes it afterwards.
Uses this resouce and closes it afterwards.
- T
the return type of the code block.
- f
the block of code to execute using this resource
- returns
the value returned by the code block.