Class

com.twitter.bijection

Convert

Related Doc: package bijection

Permalink

final case class Convert[A](a: A) extends AnyVal with Product with Serializable

Convert allows the user to convert an instance of type A to type B given an implicit Conversion that goes between the two.

For example, with an implicit Bijection[String,Array[Byte]], the following works: Array(1.toByte, 2.toByte).as[String]

Thanks to [hylotech](https://github.com/hylotech/suits/blob/master/src/main/scala/hylotech/util/Bijection.scala) for the following "as" pattern.

Linear Supertypes
Serializable, Serializable, Product, Equals, AnyVal, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Convert
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. AnyVal
  7. Any
  1. Hide All
  2. Show all
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Convert(a: A)

    Permalink

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. val a: A

    Permalink
  5. def as[B](implicit conv: Conversion[A, B]): B

    Permalink
  6. final def asInstanceOf[T0]: T0

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

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

    Permalink
    Definition Classes
    Any

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from AnyVal

Inherited from Any

Ungrouped