com.twitter.bijection

Convert

Related Doc: package bijection

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.

Source
Conversion.scala
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
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Convert(a: A)

Value Members

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

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

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

    Definition Classes
    Any
  4. val a: A

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

  6. final def asInstanceOf[T0]: T0

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

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

    Definition Classes
    Any

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from AnyVal

Inherited from Any

Ungrouped