Class

eu.shiftforward.apso.Implicits

ApsoCloseable

Related Doc: package Implicits

Permalink

implicit final class ApsoCloseable[U <: AutoCloseable] extends AnyVal

Implicit class that provides new methods for closeable resources.

Linear Supertypes
AnyVal, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ApsoCloseable
  2. AnyVal
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new ApsoCloseable(res: U)

    Permalink

    res

    the closeable resource to which the new methods are provided.

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def getClass(): Class[_ <: AnyVal]

    Permalink
    Definition Classes
    AnyVal → Any
  6. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  7. val res: U

    Permalink

    the closeable resource to which the new methods are provided.

  8. def toString(): String

    Permalink
    Definition Classes
    Any
  9. def use[T](f: (U) ⇒ T): T

    Permalink

    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.

Inherited from AnyVal

Inherited from Any

Ungrouped